Add view to send EDE student convocation
This commit is contained in:
parent
8225c48da5
commit
84440ceb2a
6 changed files with 214 additions and 15 deletions
|
|
@ -77,6 +77,14 @@ class Teacher(models.Model):
|
|||
def __str__(self):
|
||||
return '{0} {1}'.format(self.last_name, self.first_name)
|
||||
|
||||
@property
|
||||
def full_name(self):
|
||||
return '{0} {1}'.format(self.first_name, self.last_name)
|
||||
|
||||
@property
|
||||
def civility_full_name(self):
|
||||
return '{0} {1} {2}'.format(self.civility, self.first_name, self.last_name)
|
||||
|
||||
def calc_activity(self):
|
||||
"""
|
||||
Return a dictionary of calculations relative to teacher courses.
|
||||
|
|
@ -266,10 +274,18 @@ class Student(models.Model):
|
|||
def full_name(self):
|
||||
return '{0} {1}'.format(self.first_name, self.last_name)
|
||||
|
||||
@property
|
||||
def civility_full_name(self):
|
||||
return '{0} {1} {2}'.format(self.civility, self.first_name, self.last_name)
|
||||
|
||||
@property
|
||||
def pcode_city(self):
|
||||
return '{0} {1}'.format(self.pcode, self.city)
|
||||
|
||||
@property
|
||||
def is_examination_valid(self):
|
||||
return (self.date_exam and self.room and self.expert and self.internal_expert)
|
||||
|
||||
def save(self, **kwargs):
|
||||
if self.archived and not self.archived_text:
|
||||
# Fill archived_text with training data, JSON-formatted
|
||||
|
|
@ -370,6 +386,18 @@ class CorpContact(models.Model):
|
|||
def __str__(self):
|
||||
return '{0} {1}, {2}'.format(self.last_name, self.first_name, self.corporation or '-')
|
||||
|
||||
@property
|
||||
def full_name(self):
|
||||
return '{0} {1}'.format(self.first_name, self.last_name)
|
||||
|
||||
@property
|
||||
def civility_full_name(self):
|
||||
return '{0} {1} {2}'.format(self.title, self.first_name, self.last_name)
|
||||
|
||||
@property
|
||||
def pcode_city(self):
|
||||
return '{0} {1}'.format(self.pcode, self.city)
|
||||
|
||||
|
||||
class Domain(models.Model):
|
||||
name = models.CharField(max_length=50, verbose_name='Nom')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue