﻿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
18123	username field capped at 30 characters	marqh	nobody	"in Django 1.3 and 1.4:

django/contrib/auth/models.py

defines a class:

class User(models.Model):
    '''...
    '''
    username = models.CharField(_('username'), max_length=30, unique=True,help_text=_('Required. 30 characters or fewer. Letters, numbers and ''@/./+/-/_ characters'))

    first_name = models.CharField(_('first name'), max_length=30, blank=True)

    last_name = models.CharField(_('last name'), max_length=30, blank=True)


I am using kerberos authentication to provide single sign on to my Django provided web applications.  I thus obtain a username from the kerberos user management system, which has a form:

givenname.surname@fullyqualifieddomain.com

this easily exceeds the 30 character limit, meaning that new users cannot be recreated.

Django appears to forbid the overriding of theses fields (which i tried) so my fix involved patching the Django source to enable username to be 100 characters.

I would like to see this in change incorporated into the Django release, so that I can remove my build patch.  Is there a reason for such a small character limit which would make this a bad idea?

"	Bug	closed	contrib.auth	1.4	Normal	duplicate	username max_length		Unreviewed	0	0	0	0	0	0
