How to create a superuser | Django

/ #Django

A superuser has access to everything in the Django admin interface and has the possibility to create other users as well. But how do you create one?

One of the first things I usually do when I start a new project is to initialize the database and then create a superuser so I can log in to the Django admin interface.

To create a new superuser, you open up the command line and go to the root of your Django project. You only need to run one command.

$ python createsuperuser

You need to fill in information like username, e-mail and a password. Always use a really secure password for you superuser!

When you're finished filling in the information, the superuser is created. You can now start the development server and go to and sign in with the user you just created.

Video demonstration


No comments yet...

Add comment


Subscribe to my weekly newsletter. One time per week I will send you a short summary of the tutorials I have posted in the past week.