Django admin - hide remove link

118 views
Skip to first unread message

galgal

unread,
Jul 4, 2011, 5:15:04 PM7/4/11
to django...@googlegroups.com
How can I hide remove link in Django admin? I need to hide it in my code, not in permissions (only user with id=1 can see it no matter if any users are superusers)

Michał Sawicz

unread,
Jul 4, 2011, 6:12:52 PM7/4/11
to django...@googlegroups.com
Dnia 2011-07-04, pon o godzinie 14:15 -0700, galgal pisze:

> How can I hide remove link in Django admin? I need to hide it in my
> code, not in permissions (only user with id=1 can see it no matter if
> any users are superusers)

Override has_delete_permission [1] on your ModelAdmin.

https://docs.djangoproject.com/en/1.3/ref/contrib/admin/#django.contrib.admin.ModelAdmin.has_delete_permission

--
Michał (Saviq) Sawicz <mic...@sawicz.net>

signature.asc
Reply all
Reply to author
Forward
0 new messages