Previous Page Next Page

Q&A

Q.Is there a way to create a Django superuser object without accessing the admin interface or creating a new database?
A.Yes. A create_superuser.py application is located in the following location relative to where you installed Django:
django/contrib/auth/create_superuser.py

It prompts you for a superuser name and password.

Q.Is there a way to quickly email the user to let her know that her account has been created?
A.Yes. The User object includes the function email_user(subject, message, from_email=None). After the User object has been created, call the email_user() function with the subject, message, and from address (optional). The user will be notified at the email address she specified when registering the account.

Previous Page Next Page