From c4f81951e69e4865bb95dadb859554b138770ab4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Tue, 25 Sep 2018 11:07:54 +0200 Subject: [PATCH] misc: increase allowed length of name attributes (#26698) --- .../migrations/0016_auto_20180925_1107.py | 25 +++++++++++++++++++ src/authentic2/custom_user/models.py | 4 +-- 2 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 src/authentic2/custom_user/migrations/0016_auto_20180925_1107.py diff --git a/src/authentic2/custom_user/migrations/0016_auto_20180925_1107.py b/src/authentic2/custom_user/migrations/0016_auto_20180925_1107.py new file mode 100644 index 00000000..07c12485 --- /dev/null +++ b/src/authentic2/custom_user/migrations/0016_auto_20180925_1107.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.12 on 2018-09-25 09:07 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('custom_user', '0015_auto_20170707_1653'), + ] + + operations = [ + migrations.AlterField( + model_name='user', + name='first_name', + field=models.CharField(blank=True, max_length=128, verbose_name='first name'), + ), + migrations.AlterField( + model_name='user', + name='last_name', + field=models.CharField(blank=True, max_length=128, verbose_name='last name'), + ), + ] diff --git a/src/authentic2/custom_user/models.py b/src/authentic2/custom_user/models.py index ea3f4fba..74f460d5 100644 --- a/src/authentic2/custom_user/models.py +++ b/src/authentic2/custom_user/models.py @@ -83,8 +83,8 @@ class User(AbstractBaseUser, PermissionMixin): uuid = models.CharField(_('uuid'), max_length=32, default=utils.get_hex_uuid, editable=False, unique=True) username = models.CharField(_('username'), max_length=256, null=True, blank=True) - first_name = models.CharField(_('first name'), max_length=64, blank=True) - last_name = models.CharField(_('last name'), max_length=64, blank=True) + first_name = models.CharField(_('first name'), max_length=128, blank=True) + last_name = models.CharField(_('last name'), max_length=128, blank=True) email = models.EmailField(_('email address'), blank=True, validators=[validators.EmailValidator], max_length=254) email_verified = models.BooleanField( -- 2.19.0