Changed django-admin.py to display help if invoked with no arguments. Thanks, sopel
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1173 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
c62b427b12
commit
cb222e4d4e
|
@ -77,7 +77,7 @@ def main():
|
||||||
try:
|
try:
|
||||||
action = args[0]
|
action = args[0]
|
||||||
except IndexError:
|
except IndexError:
|
||||||
print_error("An action is required.", sys.argv[0])
|
parser.print_usage_and_exit()
|
||||||
if not ACTION_MAPPING.has_key(action):
|
if not ACTION_MAPPING.has_key(action):
|
||||||
print_error("Your action, %r, was invalid." % action, sys.argv[0])
|
print_error("Your action, %r, was invalid." % action, sys.argv[0])
|
||||||
if action in ('createsuperuser', 'init', 'validate'):
|
if action in ('createsuperuser', 'init', 'validate'):
|
||||||
|
|
Loading…
Reference in New Issue