Reputation: 7727
The default view for a model on the django admin page shows a list of items in that view, but only gives one field. How is it possible to show multiple fields in the list?
Upvotes: 0
Views: 241
Reputation: 168
You can set list_display as like example;
@admin.register(Personal)
class PersonalAdmin(admin.ModelAdmin):
list_display=('id','name','surname','phone',)
Upvotes: 1
Reputation: 7727
I've found the function list_display() that does this job exactly:
Upvotes: 2