{{{
username = forms.CharField(label='')
}}}
...it is ignored and the "Username:" label is rendered in HTML output.
Trying the same thing with "password" field works as expected (i.e. label
is not rendered), so this behaviour is inconsistent.
I think it is related to the following if statement in
django/contrib/auth/forms.py file:
{{{
if self.fields['username'].label is None:
self.fields['username'].label =
capfirst(self.username_field.verbose_name)
}}}
(see also: [https://code.djangoproject.com/ticket/19573 ticket #19573])
--
Ticket URL: <https://code.djangoproject.com/ticket/20617>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* needs_better_patch: => 0
* resolution: => duplicate
* needs_tests: => 0
* needs_docs: => 0
Comment:
Hi,
This issue has already been reported in ticket #20357 and a fix was
commited with commit 0732c8e8c6e156d4d9a4a1cc02d631fe41342bf8.
Thanks.
--
Ticket URL: <https://code.djangoproject.com/ticket/20617#comment:1>