Opened 8 years ago

Closed 7 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
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:


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

Download all attachments as: .zip

Change History (6)

comment:1 Changed 7 years ago by jacob

  • milestone set to 1.1
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 7 years ago by ramiro

  • Keywords pycamp2009 added
  • Owner changed from nobody to ramiro

Changed 7 years ago by ramiro

(trivial) patch for

comment:3 Changed 7 years ago by ramiro

  • Has patch set

comment:4 Changed 7 years ago by jacob

  • Resolution set to wontfix
  • Status changed from new to closed

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 deleted

Milestone 1.1 deleted

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