User9123
User9123

Reputation: 65

django admin need full table

I have only one (first - username) column of my database displayed in admin. How can I display all columns in "Select to change" panel, like on the picture? Thanks in advance!

need like this

Upvotes: 0

Views: 35

Answers (2)

caot
caot

Reputation: 3328

ModelAdmin.list_display

class PersonAdmin(admin.ModelAdmin):
    list_display = ('first_name', 'last_name')

Upvotes: 1

Alasdair
Alasdair

Reputation: 308999

In your model admin, set list_display to the list of fields that you want to display.

class MyModelAdmin(admin.ModelAdmin):
    list_display = ['field_1', 'field_2', ...]

admin.site.register(MyModel, MyModelAdmin)

Upvotes: 1

Related Questions