Django: Getting Started Transcripts
Chapter: Django Admin
Lecture: Customizing the display fields in the Admin

Login or purchase this course to watch this video and the rest of the course contents.
0:00 I'll leave the author alone for a moment. Instead, let me write an admin model class for our books.
0:12 The list, display attributes of the admin class indicates what fields get shown in the change list screen.
0:21 By default, you get one thing the objects rebel representation by setting list display to a tubal containing the id and title strings.
0:29 You'll now get a change list with two columns. Let's go take a look. I've refreshed the homepage and the book has shown up
0:37 in the catalog section. Let me click through. This is the books change list. That's much more readable than the author case.
0:47 The titles of the columns are also clickable to activate sorting. I'll just click the title column and now the books are sorted.
0:56 Once a column has been sorted, a little arrow shows up, allowing you to sort in the other direction.
1:04 There's also an indicator for turning the sorting off, clicking takes you back to whatever the model's default sorting is.


Talk Python's Mastodon Michael Kennedy's Mastodon