I have a page build model that has 开发者_开发知识库a manytomanyfield All i want is to display the other columns of the manytomany field model
I have an image model with name and category fields and I want both to display on the admin page in an inline table with a filter instead of a many to many field.
Use the inlines
property of the ModelAdmin
class.
First, define an InlineModelAdmin
(the Django documentation covers it here). Then, set the inlines
property of your page build model to a list or tuple with the class you created. You'll get exactly the behavior you want.
精彩评论