From 7b9596b974fb0ad1868b10c8c2174e10b72be403 Mon Sep 17 00:00:00 2001 From: Raffaele Salmaso Date: Tue, 22 Sep 2020 23:05:42 +0200 Subject: [PATCH] Fixed #32034 -- Removed redundant get_app_config() call in AdminSite.app_index. app_config.verbose_name is already in app_dict. --- django/contrib/admin/sites.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/django/contrib/admin/sites.py b/django/contrib/admin/sites.py index 72aafe9882a..861ddd9b26c 100644 --- a/django/contrib/admin/sites.py +++ b/django/contrib/admin/sites.py @@ -518,10 +518,9 @@ class AdminSite: raise Http404('The requested admin page does not exist.') # Sort the models alphabetically within each app. app_dict['models'].sort(key=lambda x: x['name']) - app_name = apps.get_app_config(app_label).verbose_name context = { **self.each_context(request), - 'title': _('%(app)s administration') % {'app': app_name}, + 'title': _('%(app)s administration') % {'app': app_dict['name']}, 'app_list': [app_dict], 'app_label': app_label, **(extra_context or {}),