added extendedname variable to gunciorn generation

modified:   modules/django.py
This commit is contained in:
Ronny Abraham 2016-09-07 21:51:47 +03:00
parent 0728560972
commit c1fc497547

View file

@ -31,22 +31,33 @@ def generate_secret_key():
@task @task
def test(args=None): def test(args=None):
local("ls") print "debug - testing checkapp(sorl.thumbnail): %s" % \
check_app("sorl.thumbnail")
with virtualenv():
local("ls")
@task @task
def manage(args=None): def manage_commandline(args=""):
"""
prints out what you need to run on the command line to invoke manage.py
"""
configuration = env.config
commandline = "{djangoroot}/manage.py {args} --pythonpath='{djangoroot}' " \
"--settings={djangosettings}".format(
djangoroot=configuration.paths.django.root,
args=args,
djangosettings=configuration.imports.settings,)
print commandline
@task
def manage(args=""):
configuration = env.config configuration = env.config
# changes the working directory to the djangoroot # changes the working directory to the djangoroot
from fabric.context_managers import cd from fabric.context_managers import cd
if not args:
args = "help"
with virtualenv(): with virtualenv():
with cd(configuration.paths.django.root): with cd(configuration.paths.django.root):
output = fabric_ops.run( output = fabric_ops.run(
@ -429,6 +440,7 @@ def generate_gunicorn(make_link=True):
context['group'] = configuration.project.group context['group'] = configuration.project.group
context['settings_module'] = configuration.imports.settings context['settings_module'] = configuration.imports.settings
context['extended_name'] = configuration.project.extendedname
context['logging_access'] = configuration.logging.gunicorn.access context['logging_access'] = configuration.logging.gunicorn.access
context['logging_error'] = configuration.logging.gunicorn.error context['logging_error'] = configuration.logging.gunicorn.error
@ -486,7 +498,7 @@ def edit(param='help'):
) )
build_path = os.path.join( build_path = os.path.join(
configuration.templates.gunicorn.path.dest, configuration.templates.gunicorn.path.remote,
'build', 'build',
configuration.templates.gunicorn.conf.dst) configuration.templates.gunicorn.conf.dst)