0
class TheList(admin.ModelAdmin):
    list_display = ['name', 'age']
    actions = None

I want to see a list in admin panel as readonly. If I use the below method it will show a list of objects which then need to be clicked on in order to display the name and age.

readonly_fields = ['name', 'age']

I have tried using the below admin functions which didn’t fix the problem:

has_delete_permission 
has_add_permission

The list is still editable

I tried using this with list_display:

has_change_permission

that made the class not viewable in admin panel

I want it to be like list_display but readonly, is that even possible?

ETHERC20
  • 45
  • 5

0 Answers0