summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorCollin Anderson <cmawebsite@gmail.com>2015-12-29 14:52:48 -0500
committerTim Graham <timograham@gmail.com>2016-01-08 18:06:44 -0500
commit780bddf75b93784470a2e352ed44ee35a751d667 (patch)
treee492c7184f3743dc45194491ba52bcf833b3c4fd /django
parentea7542891a4e3638a695c58bd6f00658b7c85985 (diff)
Fixed #20846 -- Decreased User.username max_length to 150 characters.
Diffstat (limited to 'django')
-rw-r--r--django/contrib/auth/migrations/0008_alter_user_username_max_length.py4
-rw-r--r--django/contrib/auth/models.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/django/contrib/auth/migrations/0008_alter_user_username_max_length.py b/django/contrib/auth/migrations/0008_alter_user_username_max_length.py
index 56705fa58f..2afbc30c2a 100644
--- a/django/contrib/auth/migrations/0008_alter_user_username_max_length.py
+++ b/django/contrib/auth/migrations/0008_alter_user_username_max_length.py
@@ -17,8 +17,8 @@ class Migration(migrations.Migration):
name='username',
field=models.CharField(
error_messages={'unique': 'A user with that username already exists.'},
- help_text='Required. 254 characters or fewer. Letters, digits and @/./+/-/_ only.',
- max_length=254,
+ help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.',
+ max_length=150,
unique=True,
validators=[
django.core.validators.RegexValidator(
diff --git a/django/contrib/auth/models.py b/django/contrib/auth/models.py
index dfa76977d7..0600b96774 100644
--- a/django/contrib/auth/models.py
+++ b/django/contrib/auth/models.py
@@ -303,9 +303,9 @@ class AbstractUser(AbstractBaseUser, PermissionsMixin):
"""
username = models.CharField(
_('username'),
- max_length=254,
+ max_length=150,
unique=True,
- help_text=_('Required. 254 characters or fewer. Letters, digits and @/./+/-/_ only.'),
+ help_text=_('Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.'),
validators=[
validators.RegexValidator(
r'^[\w.@+-]+$',