Fixes #24 - Set Student.birth_date as nullable in DB
This commit is contained in:
parent
685663cfd6
commit
54e85b744f
2 changed files with 17 additions and 1 deletions
16
stages/migrations/0003_student_birthdate_nullable.py
Normal file
16
stages/migrations/0003_student_birthdate_nullable.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('stages', '0002_add_student_option_ase'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='student',
|
||||
name='birth_date',
|
||||
field=models.DateField(blank=True, null=True, verbose_name='Date de naissance'),
|
||||
),
|
||||
]
|
||||
|
|
@ -157,7 +157,7 @@ class Student(models.Model):
|
|||
first_name = models.CharField(max_length=40, verbose_name='Prénom')
|
||||
last_name = models.CharField(max_length=40, verbose_name='Nom')
|
||||
gender = models.CharField('Genre', max_length=3, blank=True, choices=GENDER_CHOICES)
|
||||
birth_date = models.DateField(blank=True, verbose_name='Date de naissance')
|
||||
birth_date = models.DateField('Date de naissance', null=True, blank=True)
|
||||
street = models.CharField(max_length=150, blank=True, verbose_name='Rue')
|
||||
pcode = models.CharField(max_length=4, verbose_name='Code postal')
|
||||
city = models.CharField(max_length=40, verbose_name='Localité')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue