~ubuntu-branches/ubuntu/quantal/python-django/quantal-security

« back to all changes in this revision

Viewing changes to django/contrib/auth/forms.py

  • Committer: Bazaar Package Importer
  • Author(s): Jamie Strandboge
  • Date: 2010-10-12 11:34:35 UTC
  • mfrom: (1.2.7 upstream)
  • mto: This revision was merged to the branch mainline in revision 30.
  • Revision ID: james.westby@ubuntu.com-20101012113435-9lnsrh0i3mxozbt0
Tags: upstream-1.2.3
ImportĀ upstreamĀ versionĀ 1.2.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
    class Meta:
53
53
        model = User
54
54
 
 
55
    def __init__(self, *args, **kwargs):
 
56
        super(UserChangeForm, self).__init__(*args, **kwargs)
 
57
        f = self.fields.get('user_permissions', None)
 
58
        if f is not None:
 
59
            f.queryset = f.queryset.select_related('content_type')
 
60
 
55
61
class AuthenticationForm(forms.Form):
56
62
    """
57
63
    Base class for authenticating users. Extend this to get a form that accepts