diff --git a/modules/django.py b/modules/django.py index b9290ad..4d9af9b 100644 --- a/modules/django.py +++ b/modules/django.py @@ -380,7 +380,7 @@ def generate_scripts(template_name, make_copy=False): @task -def generate(param=None, make_copy=False): +def generate(param="help", make_copy=False): """ param can be one of settings, local, wsgi make_copy must be set to True if you want it to actually do anthing @@ -392,12 +392,28 @@ def generate(param=None, make_copy=False): make_copy = booleanize(make_copy) - if param and param not in PARAM_LIST: - err_msg = "You asked to generate %s, that value isn't available" \ - " possible script values available: %s" % (param, PARAM_LIST) + if param: - import sys - sys.exit(err_msg) + err_msg = None + + if param == "help": + err_msg = """ + + fab django.generate:param="help",make_copy=False + + param - file to be generated can be of type: %s + + make_copy - determines whether or generate copies the generated file + into it's practical location (otherwise doesn't do anything) + """ % PARAM_LIST + + elif param not in PARAM_LIST: + err_msg = "You asked to generate %s, that value isn't available" \ + " possible script values available: %s" % (param, PARAM_LIST) + + if err_msg: + import sys + sys.exit(err_msg) print("django:generate make_copy : %s\n" % make_copy) print("django:generate script : %s" % param)