#31972: Django AuthenticationForm.UsernameField does not change field widget
according to UserModel.USERNAME_FIELD
-------------------------------------+-------------------------------------
               Reporter:  Maksudul   |          Owner:  nobody
  Haque                              |
                   Type:  Bug        |         Status:  assigned
              Component:  Forms      |        Version:  3.1
               Severity:  Normal     |       Keywords:  forms,
           Triage Stage:             |  AuthenticationForm
  Unreviewed                         |      Has patch:  0
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 First of all,
 Thank you for such an amazing Framework. You guys are doing amazing work
 on Django. really appreciate it. :)

 Today I was using {{{AuthenticationForm}}} to log users in but I use a
 custom User model and it specifies  {{{USERNAME_FIELD}}} as email.
 So, when I rendered the form {{{({{ form }})}}} I saw this:

 {{{
 <input type="text" name="username" autofocus="" autocapitalize="none"
 autocomplete="off" maxlength="254" required="" id="id_username">
 }}}



 It was using {{{text}}} type input field Though It should render
 {{{email}}} type field.

 I don't know if it is a bug or it was intentional.

 If it is a bug I would like to submit a PR! :)

-- 
Ticket URL: <https://code.djangoproject.com/ticket/31972>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/051.bdcb20f3354b414b37efd16eb16790e5%40djangoproject.com.

Reply via email to