diff --git a/django/contrib/admin/actions.py b/django/contrib/admin/actions.py index d215aa6259..158c436c71 100644 --- a/django/contrib/admin/actions.py +++ b/django/contrib/admin/actions.py @@ -71,7 +71,6 @@ def delete_selected(modeladmin, request, queryset): "perms_lacking": perms_needed, "protected": protected, "opts": opts, - "app_label": app_label, 'action_checkbox_name': helpers.ACTION_CHECKBOX_NAME, } diff --git a/django/contrib/admin/options.py b/django/contrib/admin/options.py index 4c5adaf0f8..02f9ed3a84 100644 --- a/django/contrib/admin/options.py +++ b/django/contrib/admin/options.py @@ -1308,7 +1308,6 @@ class ModelAdmin(BaseModelAdmin): media=media, inline_admin_formsets=inline_admin_formsets, errors=helpers.AdminErrorList(form, formsets), - app_label=opts.app_label, preserved_filters=self.get_preserved_filters(request), ) context.update(extra_context or {}) @@ -1532,7 +1531,6 @@ class ModelAdmin(BaseModelAdmin): media=media, has_add_permission=self.has_add_permission(request), opts=cl.opts, - app_label=app_label, action_form=action_form, actions_on_top=self.actions_on_top, actions_on_bottom=self.actions_on_bottom, @@ -1627,7 +1625,6 @@ class ModelAdmin(BaseModelAdmin): action_list=action_list, module_name=capfirst(force_text(opts.verbose_name_plural)), object=obj, - app_label=app_label, opts=opts, preserved_filters=self.get_preserved_filters(request), ) diff --git a/django/contrib/admin/sites.py b/django/contrib/admin/sites.py index d72666a257..22c1b29ab4 100644 --- a/django/contrib/admin/sites.py +++ b/django/contrib/admin/sites.py @@ -381,7 +381,7 @@ class AdminSite(object): app_dict[app_label]['models'].append(model_dict) else: app_dict[app_label] = { - 'name': app_label.title(), + 'name': app_cache.get_app_config(app_label).verbose_name, 'app_label': app_label, 'app_url': reverse('admin:app_list', kwargs={'app_label': app_label}, current_app=self.name), 'has_module_perms': has_module_perms, @@ -390,7 +390,7 @@ class AdminSite(object): # Sort the apps alphabetically. app_list = list(six.itervalues(app_dict)) - app_list.sort(key=lambda x: x['name']) + app_list.sort(key=lambda x: x['name'].lower()) # Sort the models alphabetically within each app. for app in app_list: @@ -408,6 +408,7 @@ class AdminSite(object): def app_index(self, request, app_label, extra_context=None): user = request.user + app_name = app_cache.get_app_config(app_label).verbose_name has_module_perms = user.has_module_perms(app_label) if not has_module_perms: raise PermissionDenied @@ -442,7 +443,7 @@ class AdminSite(object): # something to display, add in the necessary meta # information. app_dict = { - 'name': app_label.title(), + 'name': app_name, 'app_label': app_label, 'app_url': '', 'has_module_perms': has_module_perms, @@ -453,7 +454,7 @@ class AdminSite(object): # Sort the models alphabetically within each app. app_dict['models'].sort(key=lambda x: x['name']) context = dict(self.each_context(), - title=_('%s administration') % capfirst(app_label), + title=_('%s administration') % app_name, app_list=[app_dict], app_label=app_label, ) diff --git a/django/contrib/admin/templates/admin/auth/user/change_password.html b/django/contrib/admin/templates/admin/auth/user/change_password.html index 2a1b4d3c90..3634ed4083 100644 --- a/django/contrib/admin/templates/admin/auth/user/change_password.html +++ b/django/contrib/admin/templates/admin/auth/user/change_password.html @@ -11,7 +11,7 @@ {% block breadcrumbs %}