📜  django include all columns admin show - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:31.390000             🧑  作者: Mango

代码示例1
class BookAdmin(admin.ModelAdmin):
    list_display = ('title', 'author', 'price')
    # - or -
    list_display = BookAdmin._meta.get_all_field_names()
admin.site.register(Book, BookAdmin)