Skip to content

Django Admin

Django Admin

The Django Admin page is an admin page built-in into django. It provides user management options and, if configurd, enables for managing the model instances.

Django Admin Dashboard

Customization

To include custom apps and their respective models in the admin page, a file called admin.py has to be added to the root folder of the app. In our case, the app is patients. A file, adding the patient and the report model looks like this:

from django.contrib import admin
from simple_history.admin import SimpleHistoryAdmin
from .models import Patient, Report

admin.site.register(Patient)
admin.site.register(Report, SimpleHistoryAdmin)