Disable link to edit object in django's admin (display list only)?

后端 未结 12 562
渐次进展
渐次进展 2020-12-12 22:05

In Django\'s admin, I want disable the links provided on the \"select item to change\" page so that users cannot go anywhere to edit the item. (I am going to limit

12条回答
  •  星月不相逢
    2020-12-12 22:30

    In Django 1.7 and later, you can do

    class HitAdmin(admin.ModelAdmin):
        list_display_links = None
    

提交回复
热议问题