mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-22 14:13:21 +00:00
Date of birth is no longer mandatory
This commit is contained in:
parent
1feea061f6
commit
5355492c76
19
core/migrations/0002_auto_20160705_2303.py
Normal file
19
core/migrations/0002_auto_20160705_2303.py
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('core', '0001_initial'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='user',
|
||||||
|
name='date_of_birth',
|
||||||
|
field=models.DateField(verbose_name='date of birth', blank=True),
|
||||||
|
),
|
||||||
|
]
|
19
core/migrations/0003_auto_20160705_2304.py
Normal file
19
core/migrations/0003_auto_20160705_2304.py
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('core', '0002_auto_20160705_2303'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='user',
|
||||||
|
name='date_of_birth',
|
||||||
|
field=models.DateField(null=True, blank=True, verbose_name='date of birth'),
|
||||||
|
),
|
||||||
|
]
|
@ -75,7 +75,7 @@ class User(AbstractBaseUser, PermissionsMixin):
|
|||||||
first_name = models.CharField(_('first name'), max_length=30)
|
first_name = models.CharField(_('first name'), max_length=30)
|
||||||
last_name = models.CharField(_('last name'), max_length=30)
|
last_name = models.CharField(_('last name'), max_length=30)
|
||||||
email = models.EmailField(_('email address'), unique=True)
|
email = models.EmailField(_('email address'), unique=True)
|
||||||
date_of_birth = models.DateField(_('date of birth'))
|
date_of_birth = models.DateField(_('date of birth'), blank=True, null=True)
|
||||||
nick_name = models.CharField(max_length=30, blank=True)
|
nick_name = models.CharField(max_length=30, blank=True)
|
||||||
is_staff = models.BooleanField(
|
is_staff = models.BooleanField(
|
||||||
_('staff status'),
|
_('staff status'),
|
||||||
@ -99,7 +99,7 @@ class User(AbstractBaseUser, PermissionsMixin):
|
|||||||
objects = UserManager()
|
objects = UserManager()
|
||||||
|
|
||||||
USERNAME_FIELD = 'username'
|
USERNAME_FIELD = 'username'
|
||||||
REQUIRED_FIELDS = ['email', 'date_of_birth']
|
# REQUIRED_FIELDS = ['email']
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
verbose_name = _('user')
|
verbose_name = _('user')
|
||||||
|
Loading…
Reference in New Issue
Block a user