Opened 4 years ago

Closed 4 years ago

#32034 closed Cleanup/optimization (fixed)

Removed duplicate lookup in AdminSite.app_index view

Reported by: Raffaele Salmaso Owned by: Raffaele Salmaso
Component: contrib.admin Version: 3.1
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

AdminSites.app_index needs an app_name to render title page.
Currently it is retrieved by an apps.get_app_config lookup, but the same name is already present in app_dict dictionary

                app_dict[app_label] = {
                    'name': apps.get_app_config(app_label).verbose_name,

Change History (7)

comment:1 by Raffaele Salmaso, 4 years ago

Owner: changed from nobody to Raffaele Salmaso
Status: newassigned
Summary: Remove duplicate lookup in AdminSite.app_index viewRemoved duplicate lookup in AdminSite.app_index view

comment:2 by Raffaele Salmaso, 4 years ago

I don't know if this needs testing (I cannot find one)

comment:3 by Mariusz Felisiak, 4 years ago

Triage Stage: UnreviewedAccepted
Type: UncategorizedCleanup/optimization

comment:4 by Mariusz Felisiak, 4 years ago

Needs tests: set

comment:5 by Mariusz Felisiak, 4 years ago

Needs tests: unset
Triage Stage: AcceptedReady for checkin

comment:6 by Mariusz Felisiak <felisiak.mariusz@…>, 4 years ago

In 666f2e8:

Refs #32034 -- Added test for title on admin app index view.

comment:7 by Mariusz Felisiak <felisiak.mariusz@…>, 4 years ago

Resolution: fixed
Status: assignedclosed

In 7b9596b9:

Fixed #32034 -- Removed redundant get_app_config() call in AdminSite.app_index.

app_config.verbose_name is already in app_dict.

Note: See TracTickets for help on using tickets.
Back to Top