Fixed #22770 -- Removed create_superuser from post_migrate signals.

Moved logic to syncdb command for backwards compatibility.
This commit is contained in:
Tim Graham 2014-06-10 12:22:07 -04:00
parent a00b78b1e2
commit 93d05536fd
6 changed files with 60 additions and 74 deletions

View file

@ -206,40 +206,7 @@ The :djadmin:`migrate` command looks at the :setting:`INSTALLED_APPS` setting
and creates any necessary database tables according to the database settings
in your :file:`mysite/settings.py` file and the database migrations shipped
with the app (we'll cover those later). You'll see a message for each
migration it applies, and you'll get a prompt asking you if you'd like to
create a superuser account for the authentication system.
First, you'll be asked if you would like to create a superuser. Type the word
``yes`` and hit enter.
.. code-block:: text
You have installed Django's auth system, and don't have any superusers defined.
Would you like to create one now? (yes/no): yes
Next, enter a username. By default, this will be your system username. Enter
your desired username and press enter.
.. code-block:: text
Username (leave blank to use 'your_username'): admin
You will then be prompted for your desired email address:
.. code-block:: text
Email address: admin@example.com
The final step is to enter your password. You will be asked to enter your
password twice, the second time as a confirmation of the first.
.. code-block:: text
Password: **********
Password (again): *********
Superuser created successfully.
With that done, if you're interested, run the command-line client for your
migration it applies. If you're interested, run the command-line client for your
database and type ``\dt`` (PostgreSQL), ``SHOW TABLES;`` (MySQL), or
``.schema`` (SQLite) to display the tables Django created.