Changeset 2841
- Timestamp:
- 05/04/06 22:08:29 (2 years ago)
- Files:
-
- django/trunk/django/contrib/auth/create_superuser.py (modified) (2 diffs)
- django/trunk/docs/authentication.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/django/contrib/auth/create_superuser.py
r2809 r2841 1 1 """ 2 2 Helper function for creating superusers in the authentication system. 3 4 If run from the command line, this module lets you create a superuser 5 interactively. 3 6 """ 4 7 … … 83 86 u.save() 84 87 print "Superuser created successfully." 88 89 if __name__ == "__main__": 90 createsuperuser() django/trunk/docs/authentication.txt
r2809 r2841 37 37 The ``syncdb`` command creates the necessary database tables, creates 38 38 permission objects for all installed apps that need 'em, and prompts you to 39 create a superuser account .39 create a superuser account the first time you run it. 40 40 41 41 Once you've taken those steps, that's it. … … 227 227 own, but they're used by Web requests, as explained in the next section. 228 228 229 Creating superusers 230 ------------------- 231 232 ``manage.py syncdb`` prompts you to create a superuser the first time you run 233 it after adding ``'django.contrib.auth'`` to your ``INSTALLED_APPS``. But if 234 you need to create a superuser after that via the command line, you can use the 235 ``create_superuser.py`` utility. Just run this command:: 236 237 python /path/to/django/contrib/auth/create_superuser.py 238 239 Make sure to substitute ``/path/to/`` with the path to the Django codebase on 240 your filesystem. 241 229 242 Authentication in Web requests 230 243 ==============================
