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 manage.py file in the activated virtual environment. Execute the following command that executes the createsuperuser subcommand for the manage.py script to allow us to create the superuser:

    python manage.py 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 books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.