How to show all fields of model in admin page?

后端 未结 11 639
無奈伤痛
無奈伤痛 2021-01-30 16:25

here is the models page

In this picture, only the title shows up on here, I used:

 def __unicode__(self):
        return self.title;  

11条回答
  •  情话喂你
    2021-01-30 16:50

    Show all fields:

    list_display = [field.attname for field in BookModel._meta.fields]
    

提交回复
热议问题