Skip to Content
Django 3 Web Development Cookbook - Fourth Edition
book

Django 3 Web Development Cookbook - Fourth Edition

by Aidas Bendoraitis, Jake Kronika
March 2020
Intermediate to advanced
608 pages
17h 17m
English
Packt Publishing
Content preview from Django 3 Web Development Cookbook - Fourth Edition

Customizing columns on the change list page

The change list views in the default Django administration system provide an overview of all of the instances of the specific models. By default, the list_display model admin attribute controls the fields that are shown in different columns. Additionally, you can implement custom admin methods that will return the data from relations or display custom HTML. In this recipe, we will create a special function, for use with the list_display attribute, that shows an image in one of the columns of the list view. As a bonus, we will make one field directly editable in the list view by adding the list_editable setting.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Django 2 Web Development Cookbook - Third Edition

Django 2 Web Development Cookbook - Third Edition

Jake Kronika, Aidas Bendoraitis

Publisher Resources

ISBN: 9781838987428Supplemental Content