"""
from os.path import abspath, dirname, exists, join
+from django.utils.crypto import get_random_string
from fabric.api import *
from fabric.contrib import files
from fabric.tasks import Task, execute
template = '%(project_name)s/localsettings.py.template'
if not exists(template):
template = join(dirname(abspath(__file__)), 'templates/localsettings.py.template')
- env.secret_key = '' # sth random
+ env.secret_key = get_random_string(50)
files.upload_template(template, '%(app_path)s/localsettings.py.sample' % env, env)
def upload_nginx_sample():
MEDIA_ROOT = '%(app_path)s/media/'
STATIC_ROOT = '%(app_path)s/static/'
-FNPDJANGO_REALIP = False
-FNPDJANGO_XACCEL = False
+
+# Those should be set to True if you are behind Nginx.
+FNPDJANGO_REALIP = True
+FNPDJANGO_XACCEL = True