Creating admin login credentials for Django

This post describes how you can create a user who can login to the django admin site. For previous steps to create your django project refet to “Starting webserver using your first simple Django project”

$ python createsuperuser

Enter your desired username and press enter. By default, above command takes your machine username as admin username if you decides to leave below input blank and pressed enter.

Username (leave blank to use ‘devlab’): admin

You will then be prompted for your desired email address:

Email address:

You will then be prompted to enter the admin users login password, which you can enter and confirm by entering again as below,

Related :   Understanding many-to-one relationship and implementing it using ForeignKey in Django / DRF

Password (again):

here, as you can see we created username as “admin” and tried to set the password as “admin123” but it shown following warning, which we took it seriously and said “N” when asked to proceed with unsecure and common password.

The password is too similar to the username.
This password is too common.
Bypass password validation and create user anyway? [y/N]: N

After which it asked to enter the password again and we entered it with some number, alphabet combination to make it more secure.

Password (again):

Superuser created successfully.

Now, start the server again,

$ python runserver

And visit “” for log-in to dashboard.


Subscribe with Valid Email Id to receive updates in Inbox. ( Secured by Google FeedBurner )


Leave a Comment

Android Android Applications Android Build system Android Commands Application Libraries Application Stack / User Interface Bash / Shell Scripts Bluetooth driver Cloud Technologies Commands and Packages Compilation Content Management System Core Kernel C Programs Development & Build Development, Debugging and Performance Tools Development Environment Setup Django & REST Api Errors & Failures Git Hardware Platforms HTML JAVA Programs Linux, OS Concepts and Networking Linux Device Drivers Linux Host, Ubuntu, SysAdmin Linux Kernel Linux Networking Middleware Libraries, HAL Multimedia Audio, Video, Images NDK / Middleware / HAL OS Concepts PHP Programming Languages Scripting and Automation Search Engine Optimisation ( SEO ) Social Media Source Code Management ( SCM ) System Administration, Security Testing and Debugging Uncategorized Web design and development Website Hosting Wordpress Yocto / Bitbake / Openembedded