diff --git a/modules/django.py b/modules/django.py index 3a08ebd..b9cc655 100644 --- a/modules/django.py +++ b/modules/django.py @@ -129,23 +129,35 @@ def run(args=None): @task -def startapp(args): +def startapp(appname='help'): """ wrapper for the django.startapp takes name of app and creates in in code/apps - args - name of app + appname - name of app """ configuration = env.config - destination = os.path.join(configuration.paths.django.apps, args) + msg_help = """ + django.startapp takes one of two values: + \thelp - this help message + \tappname - the name of the app you want to start + """ + + from utils import handle_help + import sys + + if handle_help(appname, msg_help, 'help'): + sys.exit() + + destination = os.path.join(configuration.paths.django.apps, appname) cmd_mkdir = "mkdir {destination}".format( destination=destination) command = "startapp {appname} {destination}".format( - appname=args, + appname=appname, destination=destination) fabric_ops.run(cmd_mkdir)