Last modified: May 30, 2023 By Alexander Williams

How to Create a Django Superuser using Command Line

In this article, we will explore the process of creating a Django superuser using the command line.

creating Django superuser


python 2:

python createsuperuser

python 3:

python3 createsuperuser

Now, let's proceed with creating a superuser in an actual project.

Please note that you should be in the project's core directory before creating your superuser.

python3 createsuperuser
Username (leave blank to use 'py'): pytutorial
Email address:
Password (again): 
Superuser created successfully.

The user will be successfully created after entering your password and providing some optional information. Now, let's verify if the user is functioning correctly.

How to Create django Superuser using Command Line

How to Create django Superuser using Command Line