Django Show more fields in many ways on the admin page

I have a page build model that has a multi-headed field All I want to do is display the other columns of the multi-tone field model.

I have an image model with name and category fields, and I want both of them to be displayed on the admin page in a built-in table with a filter, and not with a large number of fields.

+4
source share
1 answer

Use the inlines property of the inlines class.

First define InlineModelAdmin (the Django documentation covers here ). Then set the inlines property of your page model to a list or tuple with the class you created. You will get exactly what you want.

+3
source

Source: https://habr.com/ru/post/1342098/


All Articles