Skip to content

Commit

Permalink
Fixed #943 -- Restored django-admin createsuperuser functionality wit…
Browse files Browse the repository at this point in the history
…h no arguments. Thanks, deric

git-svn-id: http://code.djangoproject.com/svn/django/trunk@1477 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
adrianholovaty committed Nov 28, 2005
1 parent 79e710b commit 133839b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions django/bin/django-admin.py
Expand Up @@ -84,9 +84,13 @@ def main():
try:
username, email, password = args[1], args[2], args[3]
except IndexError:
sys.stderr.write("Error: %r requires arguments of 'username email password' or no argument at all.\n")
sys.exit(1)
ACTION_MAPPING[action](username, email, password)
if len(args) == 1: # We got no arguments, just the action.
ACTION_MAPPING[action]()
else:
sys.stderr.write("Error: %r requires arguments of 'username email password' or no argument at all.\n")
sys.exit(1)
else:
ACTION_MAPPING[action](username, email, password)
elif action in ('init', 'validate'):
ACTION_MAPPING[action]()
elif action == 'inspectdb':
Expand Down

0 comments on commit 133839b

Please sign in to comment.