Ticket #14450: actions.py.patch
File actions.py.patch, 952 bytes (added by , 14 years ago) |
---|
-
actions.py
old new 12 12 from django.utils.safestring import mark_safe 13 13 from django.utils.text import capfirst 14 14 from django.utils.translation import ugettext_lazy, ugettext as _ 15 from django.conf import settings 15 16 16 17 def delete_selected(modeladmin, request, queryset): 17 18 """ … … 25 26 """ 26 27 opts = modeladmin.model._meta 27 28 app_label = opts.app_label 29 app_name = app_label.title() 30 try: 31 app_name = settings.APP_NAMES[app_label] 32 except: 33 pass 28 34 29 35 # Check that the user has delete permission for the actual model 30 36 if not modeladmin.has_delete_permission(request): … … 60 66 "opts": opts, 61 67 "root_path": modeladmin.admin_site.root_path, 62 68 "app_label": app_label, 69 "app_name": app_name, 63 70 'action_checkbox_name': helpers.ACTION_CHECKBOX_NAME, 64 71 } 65 72