diff options
| author | Jannis Leidel <jannis@leidel.info> | 2011-07-29 09:40:43 +0000 |
|---|---|---|
| committer | Jannis Leidel <jannis@leidel.info> | 2011-07-29 09:40:43 +0000 |
| commit | 94f74813969911a540b7d6b15bd42891ed2bf237 (patch) | |
| tree | 4d12636ed9c5ea72e799a215aaa47bfe9c3bf940 | |
| parent | 7d1087521313c44192418766cd1c8b0808c37e1a (diff) | |
Fixed #16377 -- Fixed docs about how to disable the admin actions conditionally to match the current code. Thanks, Aymeric Augustin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16567 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | docs/ref/contrib/admin/actions.txt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/docs/ref/contrib/admin/actions.txt b/docs/ref/contrib/admin/actions.txt index d3e9c74bad..cffdc3c21d 100644 --- a/docs/ref/contrib/admin/actions.txt +++ b/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 |
