Opened 15 years ago

Closed 15 years ago

Last modified 13 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: no UI/UX: no

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 15 years ago.
(trivial) patch for

Download all attachments as: .zip

Change History (6)

comment:1 by Jacob, 15 years ago

milestone: 1.1
Triage Stage: UnreviewedAccepted

comment:2 by Ramiro Morales, 15 years ago

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

by Ramiro Morales, 15 years ago

(trivial) patch for

comment:3 by Ramiro Morales, 15 years ago

Has patch: set

comment:4 by Jacob, 15 years ago

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 by Jacob, 13 years ago

milestone: 1.1

Milestone 1.1 deleted

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