Django

Code

Show
Ignore:
Timestamp:
06/08/08 00:31:16 (3 months ago)
Author:
jacob
Message:

Fixed #5614: added 'manage.py createsuperuser'. Thanks, programmerq.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/docs/authentication.txt

    r7388 r7590  
    264264 
    265265``manage.py syncdb`` prompts you to create a superuser the first time you run 
    266 it after adding ``'django.contrib.auth'`` to your ``INSTALLED_APPS``. But if 
    267 you need to create a superuser after that via the command line, you can use the 
    268 ``create_superuser.py`` utility. Just run this command:: 
     266it after adding ``'django.contrib.auth'`` to your ``INSTALLED_APPS``. If you need 
     267to create a superuser at a later date, you can use a command line utility. 
     268 
     269**New in Django development version.**:: 
     270 
     271    manage.py createsuperuser --username=joe --email=joe@example.com 
     272 
     273You will be prompted for a password. Once entered, the user is created. If you 
     274leave off the ``--username`` or the ``--email`` option, It will prompt you for 
     275those values as well. 
     276 
     277If you're using an older release of Django, the old way of creating a superuser 
     278on the command line still works:: 
    269279 
    270280    python /path/to/django/contrib/auth/create_superuser.py 
    271281 
    272 Make sure to substitute ``/path/to/`` with the path to the Django codebase on 
    273 your filesystem. 
     282Where ``/path/to`` is the path to the Django codebase on your filesystem. The 
     283``manage.py`` command is prefered since it'll figure out the correct path and 
     284environment for you. 
    274285 
    275286Storing additional information about users