mirror of
https://gitlab.science.ru.nl/technicie/MarietjeDjango.git
synced 2025-12-09 18:52:23 +01:00
Allow blank email for user
This commit is contained in:
18
marietje/marietje/migrations/0006_user_blank_email.py
Normal file
18
marietje/marietje/migrations/0006_user_blank_email.py
Normal 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'),
|
||||
),
|
||||
]
|
||||
@ -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'),
|
||||
|
||||
Reference in New Issue
Block a user