In this article, we'll learn how to create a Django superuser by using the command line.

creating Django superuser

command:

python 2:


python manage.py createsuperuser
    

python 3:


python3 manage.py createsuperuser

so now, let's create a superuser in a real project.

Remember, before creating your superuser, you need to be in the project core directory.


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

as you can see, after entering my password & some optional information, the user is created.

now, let's check out if the user is working


How to Create django Superuser using Command Line



How to Create django Superuser using Command Line

Done!

English today is not an art to be mastered it's just a tool to use to get a result