diff --git a/.gitignore b/.gitignore index a07b7d1..a5d3e4a 100644 --- a/.gitignore +++ b/.gitignore @@ -3,11 +3,16 @@ *.swo *~ *# +*.log /media/picture /venv/ +.vagrant/ +static/ *.sqlite3 fiches/templates/fiches/base_old.html fiches/static/fiches/css_old/ + +.vscode diff --git a/fiches/migrations/0008_auto_20201113_1038.py b/fiches/migrations/0008_auto_20201113_1038.py new file mode 100644 index 0000000..fcf28e3 --- /dev/null +++ b/fiches/migrations/0008_auto_20201113_1038.py @@ -0,0 +1,23 @@ +# Generated by Django 2.2.17 on 2020-11-13 10:38 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('fiches', '0007_auto_20200917_1421'), + ] + + operations = [ + migrations.AlterField( + model_name='department', + name='name', + field=models.CharField(max_length=255, unique=True, verbose_name='nom du département'), + ), + migrations.AlterField( + model_name='profile', + name='birth_date', + field=models.DateField(blank=True, null=True, verbose_name='date de naissance'), + ), + ] diff --git a/fiches/models.py b/fiches/models.py index 3dbc3cf..8c7111a 100644 --- a/fiches/models.py +++ b/fiches/models.py @@ -23,7 +23,9 @@ class Profile(models.Model): promotion = models.IntegerField( validators=[MinValueValidator(1980)], verbose_name=_("promotion") ) - birth_date = models.DateField(blank=True, verbose_name=_("date de naissance")) + birth_date = models.DateField( + blank=True, null=True, verbose_name=_("date de naissance") + ) thurne = models.CharField(blank=True, max_length=100, verbose_name=_("thurne")) text_field = models.TextField(blank=True, verbose_name=_("champ libre")) printing = models.BooleanField( @@ -41,7 +43,9 @@ class Profile(models.Model): class Department(models.Model): - name = models.CharField(max_length=255, verbose_name=_("nom du département")) + name = models.CharField( + max_length=255, verbose_name=_("nom du département"), unique=True + ) def __str__(self): return self.name