Small model tweaks
This commit is contained in:
parent
a73496cd67
commit
a51cc4bb60
3 changed files with 34 additions and 2 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -3,11 +3,16 @@
|
|||
*.swo
|
||||
*~
|
||||
*#
|
||||
*.log
|
||||
|
||||
/media/picture
|
||||
|
||||
/venv/
|
||||
.vagrant/
|
||||
static/
|
||||
|
||||
*.sqlite3
|
||||
fiches/templates/fiches/base_old.html
|
||||
fiches/static/fiches/css_old/
|
||||
|
||||
.vscode
|
||||
|
|
23
fiches/migrations/0008_auto_20201113_1038.py
Normal file
23
fiches/migrations/0008_auto_20201113_1038.py
Normal file
|
@ -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'),
|
||||
),
|
||||
]
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue