Answers for "django include all columns admin show"

0

django include all columns admin show

class BookAdmin(admin.ModelAdmin):
    list_display = ('title', 'author', 'price')
    # - or -
    list_display = BookAdmin._meta.get_all_field_names()
admin.site.register(Book, BookAdmin)
Posted by: Guest on August-30-2021

Python Answers by Framework

Browse Popular Code Answers by Language