SimpleTuts.com

How to Use Django Admin Panel

In the last class we learned how to store data into a database. For that created contact model and stored data in it through form.

Now let's see how we can see that stored data, for that we need to open Django admin.

Step 1

To open admin panel go to the link http://127.0.0.1:8000/admin

Step 2

But to login to admin panel we need to create superuser. Type the below command for that

python manage.py createsuperuser

Step 3

After login your admin panel will look like this:-

Step 4

But here we can't see our contact table. To view the contact table open admin.py and add the following code:-

from django.contrib import admin
from . models import Contact

# Register your models here.

admin.site.register(Contact)

Step 53

Now you can see the contact table

Step 54

If you open the table you can see the submitted data like this

Step 55

If you clicked on any data you can see the detailed view