How do I create a superuser account in Django 1.9.6

前端 未结 7 2182
广开言路
广开言路 2021-02-05 02:18

I am reading a book (\"Learning Django Web Development\" by Sanjeev Jaiswal and Ratan Kumar) on Django, but the book is based on an earlier version of Django (prior to version 1

7条回答
  •  花落未央
    2021-02-05 02:53

    First we’ll need to create a user who can login to the admin site. Run the following command:

    $ python manage.py createsuperuser
    

    Enter your desired username and press enter. Username: admin

    You will then be prompted for your desired email address:

    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.

    Password: **********
    Password (again): *********
    Superuser created successfully.
    

提交回复
热议问题