update django manage so it has better info on debug
This commit is contained in:
parent
05a8ca6b1c
commit
01c122ffcb
1 changed files with 15 additions and 9 deletions
|
|
@ -88,19 +88,25 @@ def manage(args="", workingdir=None):
|
|||
shell='/bin/bash')
|
||||
|
||||
with cd(configuration.paths.django.root):
|
||||
output = fabric_ops.run(
|
||||
"{djangoroot}/manage.py {args} --pythonpath='{djangoroot}' "
|
||||
cmd = "{djangoroot}/manage.py {args} --pythonpath='{djangoroot}' " \
|
||||
"--settings={djangosettings}".format(
|
||||
djangoroot=configuration.paths.django.root,
|
||||
args=args,
|
||||
djangosettings=configuration.imports.settings,
|
||||
),
|
||||
# MAKE SURE THIS IS ALWAYS HERE!
|
||||
shell='/bin/bash'
|
||||
)
|
||||
djangosettings=configuration.imports.settings,)
|
||||
|
||||
# fabric.run has the ability to give me back the output
|
||||
return output
|
||||
if env.debug:
|
||||
print("command: with cd(%s)" % configuration.paths.django.root)
|
||||
print("command: fabric_ops.run(%s)" % cmd)
|
||||
else:
|
||||
|
||||
output = fabric_ops.run(
|
||||
cmd,
|
||||
# MAKE SURE THIS IS ALWAYS HERE!
|
||||
shell='/bin/bash'
|
||||
)
|
||||
|
||||
# fabric.run has the ability to give me back the output
|
||||
return output
|
||||
|
||||
# NOTE:
|
||||
# there was a major problem using fabric commands of "local" or "prefix"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue