Add candidate.examination_teacher
This commit is contained in:
parent
7a4e9e18b8
commit
b46c377919
3 changed files with 29 additions and 2 deletions
|
|
@ -72,7 +72,8 @@ class CandidateAdmin(admin.ModelAdmin):
|
|||
'marks_certificate', 'residence_permits', 'aes_accords'),
|
||||
('certif_of_800_childhood', 'certif_of_800_general', 'work_certificate'),
|
||||
('promise', 'contract', 'activity_rate'),
|
||||
('interview',),
|
||||
('inscr_other_school',),
|
||||
('interview', 'examination_teacher'),
|
||||
('examination_result', 'interview_result', 'file_result', 'total_result_points',
|
||||
'total_result_mark'),
|
||||
('confirmation_date', 'validation_date', 'convocation_date'),
|
||||
|
|
|
|||
21
candidats/migrations/0008_add_examination_teacher.py
Normal file
21
candidats/migrations/0008_add_examination_teacher.py
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('stages', '__first__'),
|
||||
('candidats', '0007_candidate_datetime_fields'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='candidate',
|
||||
options={'ordering': ('last_name',), 'verbose_name': 'Candidat'},
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='candidate',
|
||||
name='examination_teacher',
|
||||
field=models.ForeignKey(blank=True, limit_choices_to=models.Q(('abrev', 'MME'), ('abrev', 'CLG'), _connector='OR'), null=True, on_delete=models.deletion.SET_NULL, to='stages.Teacher', verbose_name='Correct. dossier'),
|
||||
),
|
||||
]
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
from django.db import models
|
||||
from django.db.models import Q
|
||||
from django.utils.dateformat import format as django_format
|
||||
|
||||
from stages.models import Corporation, CorpContact, Teacher
|
||||
|
|
@ -101,6 +102,10 @@ class Candidate(models.Model):
|
|||
marks_certificate = models.BooleanField("Bull. de notes", default=False)
|
||||
deposite_date = models.DateField('Date dépôt dossier')
|
||||
|
||||
examination_teacher = models.ForeignKey(
|
||||
Teacher, null=True, blank=True, on_delete=models.SET_NULL,
|
||||
limit_choices_to=Q(abrev='MME') | Q(abrev='CLG'), verbose_name='Correct. dossier'
|
||||
)
|
||||
examination_result = models.PositiveSmallIntegerField('Points examen', blank=True, null=True)
|
||||
interview_result = models.PositiveSmallIntegerField('Points entretien prof.', blank=True, null=True)
|
||||
file_result = models.PositiveSmallIntegerField('Points dossier', blank=True, null=True)
|
||||
|
|
@ -177,7 +182,7 @@ class Interview(models.Model):
|
|||
ordering = ('date',)
|
||||
|
||||
def __str__(self):
|
||||
return '{0} : {1}/{2} - ({3}) -salle:{4}-{5}'.format(
|
||||
return '{0} : {1} (Ent.) / {2} (Dos.) - ({3}) -salle:{4}-{5}'.format(
|
||||
self.date_formatted,
|
||||
self.teacher_int.abrev if self.teacher_int else '?',
|
||||
self.teacher_file.abrev if self.teacher_file else '?',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue