localsettings_dst_path (optional): path indicating
where to copy the localsettings file, relative
to django_root_path (defaults to project_name/localsettings.py)
localsettings_dst_path (optional): path indicating
where to copy the localsettings file, relative
to django_root_path (defaults to project_name/localsettings.py)
"""
from os.path import abspath, dirname, exists, join
from django.utils.crypto import get_random_string
"""
from os.path import abspath, dirname, exists, join
from django.utils.crypto import get_random_string
def upload_localsettings_sample():
"Fill out localsettings template and upload as a sample."
env.secret_key = get_random_string(50)
def upload_localsettings_sample():
"Fill out localsettings template and upload as a sample."
env.secret_key = get_random_string(50)
require('app_path', 'project_name')
with cd(get_django_root_path('current')):
run('%(app_path)s/ve/bin/python manage.py collectstatic --noinput' % env, pty=True)
require('app_path', 'project_name')
with cd(get_django_root_path('current')):
run('%(app_path)s/ve/bin/python manage.py collectstatic --noinput' % env, pty=True)
path = '%(app_path)s/releases/%(release)s' % dict(app_path = env['app_path'], release = release)
if 'django_root_path' in env:
path = join(path, env['django_root_path'])
path = '%(app_path)s/releases/%(release)s' % dict(app_path = env['app_path'], release = release)
if 'django_root_path' in env:
path = join(path, env['django_root_path'])