[Answer]-Show content of classes in the admin site in a list

1๐Ÿ‘

โœ…

If you are making use of the built in Django admin, you can display more information on the list view (i.e. /admin/myapp/mymodel/) by making use of the list_display option of your ModelAdmin

For example, in the following list view (of the auth.User model) you can see extra inforamtion (email, first name, last name, staff โ€ฆ):

enter image description here

In your case, in your admin.py:

class TraineeAdmin(admin.ModelAdmin):
    list_display = ['firstName', 'lastName', 'educationBeginning', 'comment',]

admin.site.register(Trainee, TraineeAdmin)
๐Ÿ‘คTimmy O'Mahony

Leave a comment