Reputation: 1365
I am trying to alter the default django admin pages on my website. Currently, when I open the admin page I see each of the models I created for my app.
And when I click through these I can also access each row of the tables they relate to. However, I would prefer to view the tables in their entirety, since it's easier to review the data this way.
How can I achieve this? Should I be creating a specific model for this?
Example: If the database table is in this format:
group term
1 a
1 b
1 c
2 d
2 e
2 f
Currently I can only alter one row at a time ie.
group: 1
term: a
But I would rather view the table as it was shown first. Ultimately I would also like to view each group independently - but I am moving one step at a time.
Upvotes: 0
Views: 574
Reputation: 5793
You could use list_display
as long as you don't have too many fields
class MyModelAdmin(admin.ModelAdmin):
list_display = ['group','term']
admin.site.register(MyModel, MyModelAdmin)
Upvotes: 1