23.3.3 Adding Extra Information to the List View
The admin app is rather rigid. There are four pages for every app, and every page has a set number of options to configure that page. The list page, in particular, focuses on presenting data that is contained in the fields of the model. To try and mitigate this limitation, the admin provides a number of options for extending the data in the list view.
The list page allows for the display of object properties. On our Post
model, shown in Figure 23.12, we can create a property to display the number of tags the instance is related to, as shown in Example 23.14.
12 class Post(models.Model): . ... 80 ...
Get Django Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.