Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Fixed #16377 -- Fixed docs about how to disable the admin actions con…

…ditionally to match the current code. Thanks, Aymeric Augustin.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 7d10875 commit 94f74813969911a540b7d6b15bd42891ed2bf237 @jezdez jezdez committed
Showing with 2 additions and 1 deletion.
  1. +2 −1  docs/ref/contrib/admin/actions.txt
3  docs/ref/contrib/admin/actions.txt
@@ -343,7 +343,8 @@ Conditionally enabling or disabling actions
def get_actions(self, request):
actions = super(MyModelAdmin, self).get_actions(request)
if request.user.username[0].upper() != 'J':
- del actions['delete_selected']
+ if 'delete_selected' in actions:
+ del actions['delete_selected']
return actions

0 comments on commit 94f7481

Please sign in to comment.
Something went wrong with that request. Please try again.