We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e8cff0b commit bdd13a4Copy full SHA for bdd13a4
django/contrib/auth/forms.py
@@ -52,6 +52,10 @@ class UserChangeForm(forms.ModelForm):
52
class Meta:
53
model = User
54
55
+ def __init__(self, *args, **kwargs):
56
+ super(UserChangeForm, self).__init__(*args, **kwargs)
57
+ self.fields['user_permissions'].queryset = self.fields['user_permissions'].queryset.select_related('content_type')
58
+
59
class AuthenticationForm(forms.Form):
60
"""
61
Base class for authenticating users. Extend this to get a form that accepts
0 commit comments