Add the Course model
This commit is contained in:
parent
d0cc60fb3e
commit
7b62c9cba1
3 changed files with 61 additions and 1 deletions
|
|
@ -337,3 +337,35 @@ class Training(models.Model):
|
|||
'comment_avail': self.availability.comment,
|
||||
'domain': str(self.availability.domain),
|
||||
}
|
||||
|
||||
|
||||
IMPUTATION_CHOICES = (
|
||||
('ASAFE', 'ASAFE'),
|
||||
('ASEFE', 'ASEFE'),
|
||||
('ASSCFE','ASSCFE'),
|
||||
('EDEpe', 'EDEpe'),
|
||||
('EDEps', 'EDEps'),
|
||||
('EDE', 'EDE'),
|
||||
('EDS', 'EDS'),
|
||||
('CAS-FPP', 'CAS-FPP'),
|
||||
)
|
||||
|
||||
class Course(models.Model):
|
||||
"""Cours et mandats attribués aux enseignants"""
|
||||
teacher = models.ForeignKey(Teacher, blank=True, null=True,
|
||||
verbose_name="Enseignant-e", on_delete=models.SET_NULL)
|
||||
klass = models.CharField("Classe(s)", max_length=40, default='')
|
||||
subject = models.CharField("Sujet", max_length=100, default='')
|
||||
section = models.CharField("Section", max_length=10, 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)
|
||||
|
||||
class Meta:
|
||||
verbose_name = 'Cours'
|
||||
verbose_name_plural = 'Cours'
|
||||
|
||||
def __str__(self):
|
||||
return '{0} - {1} - {2} - {3} - {4}'.format(
|
||||
self.teacher, self.klass, self.subject, self.period, self.section
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue