Student.mark_ep is choice-based
This commit is contained in:
parent
9f068644cb
commit
4de82b088d
2 changed files with 36 additions and 2 deletions
28
stages/migrations/0023_mark_ep_to_choices.py
Normal file
28
stages/migrations/0023_mark_ep_to_choices.py
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
# Generated by Django 2.2 on 2019-10-07 14:09
|
||||
|
||||
from django.db import migrations, models
|
||||
from stages.models import IMPUTATION_CHOICES
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('stages', '0022_student_entretienprof_fields'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='student',
|
||||
name='mark_ep',
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='student',
|
||||
name='mark_ep',
|
||||
field=models.CharField(blank=True, choices=[('non', 'Non acquis'), ('part', 'Partiellement acquis'), ('acq', 'Acquis')], default='', max_length=5, verbose_name='Note EP'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='course',
|
||||
name='imputation',
|
||||
field=models.CharField(choices=IMPUTATION_CHOICES, max_length=12, verbose_name='Imputation'),
|
||||
),
|
||||
]
|
||||
|
|
@ -263,6 +263,12 @@ GENDER_CHOICES = (
|
|||
)
|
||||
|
||||
class Student(models.Model):
|
||||
ACQ_MARK_CHOICES = (
|
||||
('non', 'Non acquis'),
|
||||
('part', 'Partiellement acquis'),
|
||||
('acq', 'Acquis'),
|
||||
)
|
||||
|
||||
ext_id = models.IntegerField(null=True, unique=True, verbose_name='ID externe')
|
||||
first_name = models.CharField(max_length=40, verbose_name='Prénom')
|
||||
last_name = models.CharField(max_length=40, verbose_name='Nom')
|
||||
|
|
@ -326,7 +332,7 @@ class Student(models.Model):
|
|||
)
|
||||
date_exam_ep = models.DateTimeField("Date exam. EP", blank=True, null=True)
|
||||
room_ep = models.CharField('Salle EP', max_length=15, blank=True)
|
||||
mark_ep = models.DecimalField('Note EP', max_digits=3, decimal_places=2, blank=True, null=True)
|
||||
mark_ep = models.CharField('Note EP', max_length=5, choices=ACQ_MARK_CHOICES, blank=True)
|
||||
internal_expert_ep = models.ForeignKey(
|
||||
Teacher, related_name='rel_internal_expert_ep', verbose_name='Expert interne EP',
|
||||
null=True, blank=True, on_delete=models.SET_NULL
|
||||
|
|
@ -648,7 +654,7 @@ class Course(models.Model):
|
|||
subject = models.CharField("Sujet", max_length=100, default='')
|
||||
period = models.IntegerField("Nb de périodes", default=0)
|
||||
# Imputation comptable: compte dans lequel les frais du cours seront imputés
|
||||
imputation = models.CharField("Imputation", max_length=10, choices=IMPUTATION_CHOICES)
|
||||
imputation = models.CharField("Imputation", max_length=12, choices=IMPUTATION_CHOICES)
|
||||
|
||||
class Meta:
|
||||
verbose_name = 'Cours'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue