From 60ea06712729c8861fdcd3a393178f0a168d44f7 Mon Sep 17 00:00:00 2001 From: Jean-Romain Garnier Date: Sun, 16 Feb 2020 19:08:44 +0000 Subject: [PATCH] Make email field mandatory --- users/migrations/0085_auto_20200216_1959.py | 21 +++++++++++++++++++++ users/models.py | 2 -- 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 users/migrations/0085_auto_20200216_1959.py diff --git a/users/migrations/0085_auto_20200216_1959.py b/users/migrations/0085_auto_20200216_1959.py new file mode 100644 index 00000000..b8702a78 --- /dev/null +++ b/users/migrations/0085_auto_20200216_1959.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.27 on 2020-02-16 18:59 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('users', '0084_auto_20191120_0159'), + ] + + operations = [ + migrations.AlterField( + model_name='user', + name='email', + field=models.EmailField(default='', help_text='External email address allowing us to contact you.', max_length=254), + preserve_default=False, + ), + ] diff --git a/users/models.py b/users/models.py index 3d21548a..432242e9 100755 --- a/users/models.py +++ b/users/models.py @@ -192,8 +192,6 @@ class User( validators=[linux_user_validator], ) email = models.EmailField( - blank=True, - null=True, help_text=_("External email address allowing us to contact you."), ) local_email_redirect = models.BooleanField(