Azad Rasul
SmartRS

SmartRS

8- Introducing the Django Admin

Azad Rasul's photo
Azad Rasul
·May 8, 2022·

1 min read

Subscribe to my newsletter and never miss my upcoming articles

Listen to this article

To create an admin user, run the following command:

py manage.py createsuperuser

Enter any username, for example Azad and press enter. Then enter your email address, for example: Then create a password. You should see:

Superuser created successfully.

Now, open a web browser and go to 127.0.0.1:8000/admin. You should see the admin’s login screen. Try logging in with the superuser account you created in the previous step.

To display poll app on the admin index page, open the polls/admin.py file, and edit it to look like this:

from django.contrib import admin

from .models import Question

admin.site.register(Question)
 
Share this