It is very old, but, nevertheless, it can help someone.
Assuming that OP
... the user can still click on the item, and then a red Delete link will appear at the bottom.
refers to the red button in the edit view. You can remove this button by extending the ModelAdmin.change_view method as follows:
def change_view(self, request, object_id=None, form_url='', extra_context=None): return super().change_view(request, object_id, form_url, extra_context=dict(show_delete=False))
You can do the same with show_save and show_save_and_continue . More info and alternatives here .
Also note that Django 2.1 now has a separate has_view_permission ( docs ), which may be a better option , depending on your use case.
djvg Jan 17 '19 at 13:55 2019-01-17 13:55
source share