Can django's auth_user.username be varchar(75)? How could that be done?
Posted
by perrierism
on Stack Overflow
See other posts from Stack Overflow
or by perrierism
Published on 2010-04-09T18:57:38Z
Indexed on
2010/04/09
23:23 UTC
Read the original article
Hit count: 384
Is there anything wrong with running alter table on auth_user to make username be varchar(75) so it can fit an email? What does that break if anything?
If you were to change auth_user.username to be varchar(75) where would you need to modify django? Is it simply a matter of changing 30 to 75 in the source code?:
username = models.CharField(_('username'), max_length=30, unique=True, help_text=_("Required. 30 characters or fewer. Letters, numbers and @/./+/-/_ characters"))
Or is there other validation on this field that would have to be changed or any other repercussions to doing so?
See comment discussion with bartek below regarding the reason for doing it.
© Stack Overflow or respective owner