diff options
Diffstat (limited to 'django')
| -rw-r--r-- | django/contrib/auth/migrations/0008_alter_user_username_max_length.py | 4 | ||||
| -rw-r--r-- | django/contrib/auth/models.py | 4 |
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.@+-]+$', |
