Allow blank email for user

This commit is contained in:
Daan Sprenkels
2018-08-16 14:30:17 +02:00
parent 33e4287b25
commit 91b0ed7fcf
2 changed files with 19 additions and 4 deletions

View File

@ -0,0 +1,18 @@
# Generated by Django 2.0 on 2018-08-16 12:29
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('marietje', '0005_user_study'),
]
operations = [
migrations.AlterField(
model_name='user',
name='email',
field=models.EmailField(blank=True, max_length=254, verbose_name='email address'),
),
]

View File

@ -59,10 +59,7 @@ class User(AbstractBaseUser, PermissionsMixin):
name = models.CharField(_('name'), max_length=30, blank=True)
email = models.EmailField(
_('email address'),
unique=True,
error_messages={
'unique': _("A user with that username already exists."),
},
blank=True,
)
is_staff = models.BooleanField(
_('staff status'),