Skip to content

Commit

Permalink
Bump max length of username/email to 200
Browse files Browse the repository at this point in the history
  • Loading branch information
inducer committed Sep 24, 2023
1 parent fe5e3ad commit 2941441
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
24 changes: 24 additions & 0 deletions accounts/migrations/0013_alter_user_email_alter_user_username.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Generated by Django 4.2.5 on 2023-09-24 19:50

import django.contrib.auth.validators
from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('accounts', '0012_django32_bigauto'),
]

operations = [
migrations.AlterField(
model_name='user',
name='email',
field=models.EmailField(blank=True, max_length=200, verbose_name='email address'),
),
migrations.AlterField(
model_name='user',
name='username',
field=models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. Letters, digits and @/./+/-/_ only.', max_length=200, unique=True, validators=[django.contrib.auth.validators.ASCIIUsernameValidator()], verbose_name='username'),
),
]
6 changes: 3 additions & 3 deletions accounts/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
class User(AbstractBaseUser, PermissionsMixin):
username = models.CharField(
_("username"),
max_length=30,
max_length=200,
unique=True,
help_text=_(
"Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
"Required. Letters, digits and @/./+/-/_ only."),
validators=[ASCIIUsernameValidator()],
error_messages={
"unique": _("A user with that username already exists."),
Expand All @@ -49,7 +49,7 @@ class User(AbstractBaseUser, PermissionsMixin):
first_name = models.CharField(_("first name"), max_length=100, blank=True)
last_name = models.CharField(_("last name"), max_length=100, blank=True)
email = models.EmailField(_("email address"), blank=True,
max_length=100)
max_length=200)
name_verified = models.BooleanField(
_("Name verified"),
default=False,
Expand Down

0 comments on commit 2941441

Please sign in to comment.