From 33c4fdba98a09a5f055630bac6fe19201bf4f81a Mon Sep 17 00:00:00 2001 From: davy39 Date: Tue, 25 Jan 2022 17:18:50 +0100 Subject: [PATCH] =?UTF-8?q?Cr=C3=A9ation=20champ=20Niveau?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- inscription/models.py | 7 +++++++ .../inscription/0008_baseeleve_niveau.py | 18 ++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 migrations/inscription/0008_baseeleve_niveau.py diff --git a/inscription/models.py b/inscription/models.py index 33b201b..fef5a52 100644 --- a/inscription/models.py +++ b/inscription/models.py @@ -144,3 +144,10 @@ def __iter__(self): spe1 = models.ManyToManyField(Spe, limit_choices_to={'groupe': '1'}, blank=True, related_name='spe1') spe2 = models.ManyToManyField(Spe, limit_choices_to={'groupe': '2'}, blank=True, related_name='spe2') spe3 = models.ManyToManyField(Spe, limit_choices_to={'groupe': '3'}, blank=True, related_name='spe3') + NIVEAU = ( + ('premiere', 'Première'), + ('deter', 'Détermination (2nde)'), + ('term', 'Terminale'), + ('crepa','CREPA'), + ) + niveau = models.CharField(max_length=10, choices=NIVEAU, verbose_name="Niveau d'inscription", default='deter') diff --git a/migrations/inscription/0008_baseeleve_niveau.py b/migrations/inscription/0008_baseeleve_niveau.py new file mode 100644 index 0000000..13f8da0 --- /dev/null +++ b/migrations/inscription/0008_baseeleve_niveau.py @@ -0,0 +1,18 @@ +# Generated by Django 4.0 on 2022-01-25 16:10 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('inscription', '0007_alter_baseeleve_nom_usage'), + ] + + operations = [ + migrations.AddField( + model_name='baseeleve', + name='niveau', + field=models.CharField(choices=[('premiere', 'Première'), ('deter', 'Détermination (2nde)'), ('term', 'Terminale'), ('crepa', 'CREPA')], default='deter', max_length=10, verbose_name="Niveau d'inscription"), + ), + ]