#19394: Forms in django.contrib.auth have "username" as a hardcoded field value
-----------------------------+------------------------
     Reporter:  dloewenherz  |      Owner:  nobody
         Type:  Bug          |     Status:  new
    Component:  Forms        |    Version:  1.5-beta-1
     Severity:  Normal       |   Keywords:
 Triage Stage:  Unreviewed   |  Has patch:  0
Easy pickings:  0            |      UI/UX:  0
-----------------------------+------------------------
 This is a barrier to users who want to make use of these forms after the
 1.5 upgrade with custom user field names.

 E.g.

 {{{
 class UserCreationForm(forms.ModelForm):
     """
     A form that creates a user, with no privileges, from the given
 username and
     password.
     """
     error_messages = {
         'duplicate_username': _("A user with that username already
 exists."),
         'password_mismatch': _("The two password fields didn't match."),
     }
     username = forms.RegexField(label=_("Username"), max_length=30,
         regex=r'^[\w.@+-]+$',
         help_text=_("Required. 30 characters or fewer. Letters, digits and
 "
                       "@/./+/-/_ only."),
         error_messages={
             'invalid': _("This value may contain only letters, numbers and
 "
                          "@/./+/-/_ characters.")})
     password1 = forms.CharField(label=_("Password"),
         widget=forms.PasswordInput)
     password2 = forms.CharField(label=_("Password confirmation"),
         widget=forms.PasswordInput,
         help_text=_("Enter the same password as above, for
 verification."))

     class Meta:
         model = User
         fields = ("username",)
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/19394>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
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 https://groups.google.com/groups/opt_out.


Reply via email to