Fixed #943 -- Restored django-admin createsuperuser functionality with no arguments. Thanks, deric
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1477 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
79e710b4df
commit
133839b033
|
@ -84,8 +84,12 @@ def main():
|
|||
try:
|
||||
username, email, password = args[1], args[2], args[3]
|
||||
except IndexError:
|
||||
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]()
|
||||
|
|
Loading…
Reference in New Issue