Summary
In this chapter, we saw how to create superusers through the Django command line and how to use them to access the admin app. After a brief tour of the admin app's basic functionality, we examined how to register our models with it to produce a CRUD interface for our data.
Then we learned how to refine this interface by modifying site-wide features. We altered how the admin app presents model data to the user by registering custom model admin classes with the admin site. This allowed us to make fine-grained changes to the representation of our models' interfaces. These modifications included customizing change list pages by adding additional columns, filters, date hierarchies, and search bars. We also modified the layout of the model admin pages by grouping and excluding fields.
This was only a very shallow dive into the functionality of the admin app. We will revisit the rich functionality of AdminSite
and ModelAdmin
in Chapter 10, Advanced Django Admin and...