Author: lukeplant
Date: 2010-09-03 13:58:53 -0500 (Fri, 03 Sep 2010)
New Revision: 13684

Modified:
   django/branches/releases/1.2.X/
   django/branches/releases/1.2.X/django/contrib/auth/forms.py
Log:
Fixed #14090 - Many sql queries needed to display change user form
  
Thanks to Suor for report and patch.

Backport for [13683] from trunk.



Property changes on: django/branches/releases/1.2.X
___________________________________________________________________
Name: svnmerge-integrated
   - 
/django/trunk:1-13360,13434,13480,13574,13600,13638,13652,13664,13666,13668,13680
   + 
/django/trunk:1-13360,13434,13480,13574,13600,13638,13652,13664,13666,13668,13680,13683

Modified: django/branches/releases/1.2.X/django/contrib/auth/forms.py
===================================================================
--- django/branches/releases/1.2.X/django/contrib/auth/forms.py 2010-09-03 
18:56:12 UTC (rev 13683)
+++ django/branches/releases/1.2.X/django/contrib/auth/forms.py 2010-09-03 
18:58:53 UTC (rev 13684)
@@ -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.

Reply via email to