O'Reilly logo

Django Unleashed by Andrew Pinkham

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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.

Example 23.14: Project Code

blog/models.py in 07ce477dd1

12   class Post(models.Model):  .       ... 80        ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required