Opened 8 years ago

Closed 8 years ago

Last modified 5 years ago

#10340 closed (wontfix)

Multiple content_type queries on "Change User" page in admin

Reported by: dc Owned by: Ramiro Morales
Component: contrib.auth Version: 1.0
Severity: Keywords: pycamp2009
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Current Permission.__unicode__() function uses self.content_type in string format. But form in admin interface will not call select_related when showing user permissions. As result when you will open "Change user" page in admin (/admin/auth/user/<any id>) you will get (3 * installed models) queries (84 in my case).

Attachments (1)

10340-admin_select_related_user_perms.diff (499 bytes) - added by Ramiro Morales 8 years ago.
(trivial) patch for

Download all attachments as: .zip

Change History (6)

comment:1 Changed 8 years ago by Jacob

milestone: 1.1
Triage Stage: UnreviewedAccepted

comment:2 Changed 8 years ago by Ramiro Morales

Keywords: pycamp2009 added
Owner: changed from nobody to Ramiro Morales

Changed 8 years ago by Ramiro Morales

(trivial) patch for

comment:3 Changed 8 years ago by Ramiro Morales

Has patch: set

comment:4 Changed 8 years ago by Jacob

Resolution: wontfix
Status: newclosed

I'd rather just leave this alone -- it's not clear that select_related will actually make this any faster, and on top of that the admin doesn't need to be a highly optimized beast.

comment:5 Changed 5 years ago by Jacob

milestone: 1.1

Milestone 1.1 deleted

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