Skip to content

Instantly share code, notes, and snippets.

@collinanderson
Last active August 29, 2015 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save collinanderson/e5f3d09e26ecec861da0 to your computer and use it in GitHub Desktop.
Save collinanderson/e5f3d09e26ecec861da0 to your computer and use it in GitHub Desktop.
username length hack
AbstractUser._meta.get_field('username').max_length = 75 # HACK
for v in AbstractUser._meta.get_field('username').validators:
if getattr(v, 'limit_value', '') == 30:
v.limit_value = 75
class User(AbstractUser):
class Meta:
db_table = 'auth_user'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment