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
command:
python 2:
python manage.py createsuperuser
python 3:
python3 manage.py 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 manage.py createsuperuser
Username (leave blank to use 'py'): pytutorial
Email address: pytutorial@py.com
Password:
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.
Done!