mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	Fixed #14090 - Many sql queries needed to display change user form
Thanks to Suor for report and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13683 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
		| @@ -52,6 +52,10 @@ class UserChangeForm(forms.ModelForm): | |||||||
|     class Meta: |     class Meta: | ||||||
|         model = User |         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): | class AuthenticationForm(forms.Form): | ||||||
|     """ |     """ | ||||||
|     Base class for authenticating users. Extend this to get a form that accepts |     Base class for authenticating users. Extend this to get a form that accepts | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user