Creating the superuser for Django

Now, we will run the necessary command to create the superuser for Django that will allow us to authenticate our requests. We will create other users later.

Make sure you are in the restful01 folder that includes the file in the activated virtual environment. Execute the following command that executes the createsuperuser subcommand for the script to allow us to create the superuser:

    python createsuperuser

The command will ask you for the username you want to use for the superuser. Enter the desired username and press Enter. We will use djangosuper as the username for this example. You will see a line similar to the following one:

    Username (leave blank to use 'gaston'):

Then, ...

Get Django RESTful Web Services now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.