About Lesson
What is Django Admin?
The Django Admin is a built-in interface that allows administrative users to create, read, update, and delete records in the database. By default, the admin panel is generated automatically based on the models defined in your Django project.
Admin Features:
- Model Management: View, add, edit, and delete records.
- Search and Filtering: Quickly search and filter records by fields.
- Permissions and Access Control: Assign different levels of access to users (e.g., staff, superusers).
- Customizable: Easily customize how data is displayed, filtered, and interacted with.
Enabling the Admin Panel
By default, Django provides the admin interface for models. However, you need to ensure the following:
- Add
'django.contrib.admin'
to theINSTALLED_APPS
insettings.py
. - Ensure you have created a superuser to access the admin panel:
python manage.py createsuperuser
- Start the development server:
python manage.py runserver
- Access the admin interface by visiting
http://127.0.0.1:8000/admin/
.
Join the conversation