Why is the username field in "django/contrib/auth/models.py" restricted?
|Reported by:||Owned by:||Adrian Holovaty|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Why is the username field for a user in django restricted to: 30 chars, alphanumeric?
It is more use to everybody who wants to be "more open" with his site when the username can be (nearly) anything. Let the site-creator decide (using his own validators) how the username should look like for his site.
username = models.CharField(_('username'), maxlength=30, unique=True, validator_list=[validators.isAlphaNumeric])
should be changed to something like:
username = models.CharField(_('username'), maxlength=255, unique=True)