diff --git a/modules/django.py b/modules/django.py index c144185..f9e1208 100644 --- a/modules/django.py +++ b/modules/django.py @@ -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"