Author: lukeplant
Date: 2010-09-03 13:56:12 -0500 (Fri, 03 Sep 2010)
New Revision: 13683
Modified:
django/trunk/django/contrib/auth/forms.py
Log:
Fixed #14090 - Many sql queries needed to display change user form
Thanks to Suor for report and patch.
Modified: django/trunk/django/contrib/auth/forms.py
===================================================================
--- django/trunk/django/contrib/auth/forms.py 2010-09-03 18:34:30 UTC (rev
13682)
+++ django/trunk/django/contrib/auth/forms.py 2010-09-03 18:56:12 UTC (rev
13683)
@@ -52,6 +52,10 @@
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
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.