django/django — pull request #1046 by zhenghao1 (2013-05-06 11:08:21+00:00)
Title: Check username field label for None

In line [173 of django.contrib.auth.forms](https://github.com/zhenghao1/django/blob/master/django/contrib/auth/forms.py#L173), the `if` check is too generic and covers too wide a scope.

Anyone that wanted to deliberately set the label to an empty string like such:

username = CharField(label='')

would still get a *Username* label being shown.

This pull request hopes to fix that with a `None` check, since the default value for label is `None`.