One of Django's most celebrated "batteries-included" features is the Django Admin Site. It reads metadata from your models to automatically generate an enterprise-grade administrative dashboard for managing content, inspecting database records, and managing staff permissions. Customizing the admin site transforms it into a bespoke operations back-office.
Django Admin is enabled by default in INSTALLED_APPS via django.contrib.admin. To log in, generate an administrative superuser account:
Start the dev server and visit http://127.0.0.1:8000/admin/.
ModelAdminTo expose your models in the admin, register them in admin.py:
You can add bulk action triggers to the admin dropdown menu:
When managing parent and child models (e.g. an Article and its Comments, or an Order and Line Items), TabularInline lets staff edit children directly inside the parent page:
Continue learning with hands-on practice, examples, and exercises in the upcoming topic.
| Previous Lesson | Next Lesson |
|---|---|
| Migrations & ORM Queries | User Model & Permissions |
Test your understanding of this lesson with 5 questions. Each question has one correct answer.
Practice in live mentor-led sessions with real projects, mock tests, and verifiable certification at MSK Institute.