mirror of
https://github.com/jazzband/django-categories.git
synced 2026-03-16 22:30:24 +00:00
Remove the delete action from the available actions.
This commit is contained in:
parent
4b373f5757
commit
a883e69451
1 changed files with 5 additions and 0 deletions
|
|
@ -97,6 +97,11 @@ class CategoryAdmin(TreeEditor, admin.ModelAdmin):
|
|||
)
|
||||
|
||||
actions = ['activate', 'deactivate']
|
||||
def get_actions(self, request):
|
||||
actions = super(CategoryAdmin, self).get_actions(request)
|
||||
if 'delete_selected' in actions:
|
||||
del actions['delete_selected']
|
||||
return actions
|
||||
|
||||
def deactivate(self, request, queryset):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Reference in a new issue