Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Fixed #14090 - Many sql queries needed to display change user form

Thanks to Suor for report and patch.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit bdd13a4daaf2471c851f538a76e86010a968d24d 1 parent e8cff0b
@spookylukey spookylukey authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 django/contrib/auth/
4 django/contrib/auth/
@@ -52,6 +52,10 @@ class UserChangeForm(forms.ModelForm):
class Meta:
model = User
+ def __init__(self, *args, **kwargs):
+ super(UserChangeForm, self).__init__(*args, **kwargs)
+ self.fields['user_permissions'].queryset = self.fields['user_permissions'].queryset.select_related('content_type')
class AuthenticationForm(forms.Form):
Base class for authenticating users. Extend this to get a form that accepts

0 comments on commit bdd13a4

Please sign in to comment.
Something went wrong with that request. Please try again.