﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
19394	"Forms in django.contrib.auth have ""username"" as a hardcoded field value"	Dan Loewenherz	nobody	"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"",)
}}}"	Cleanup/optimization	closed	Documentation	1.5-beta-1	Normal	fixed			Accepted	0	0	0	0	1	0
