Renamed Candidat.certif_of_800_general
This commit is contained in:
parent
8ccfeb394f
commit
6ebf7b3819
6 changed files with 27 additions and 10 deletions
|
|
@ -170,7 +170,7 @@ class CandidateAdmin(admin.ModelAdmin):
|
|||
'fields': (('diploma', 'diploma_detail', 'diploma_status'),
|
||||
('registration_form', 'certificate_of_payement', 'cv', 'police_record', 'reflexive_text',
|
||||
'marks_certificate', 'residence_permits', 'aes_accords'),
|
||||
('certif_of_800_childhood', 'certif_800_general', 'work_certificate'),
|
||||
('certif_of_800_childhood', 'certif_of_800_general', 'work_certificate'),
|
||||
('promise', 'contract', 'activity_rate'),
|
||||
('interview',),
|
||||
('examination_result', 'interview_result', 'file_result', 'total_result_points',
|
||||
|
|
|
|||
|
|
@ -65,12 +65,12 @@ class Migration(migrations.Migration):
|
|||
migrations.AddField(
|
||||
model_name='candidate',
|
||||
name='inscr_other_school',
|
||||
field=models.CharField(default='', max_length=30, verbose_name='Inscr. autre école'),
|
||||
field=models.CharField(blank=True, max_length=30, verbose_name='Inscr. autre école'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='candidate',
|
||||
name='residence_permits',
|
||||
field=models.PositiveSmallIntegerField(blank=True, choices=[(0, 'Pas nécessaire'), (1, 'Nécessaire - OK'), (2, 'Manquante')], default=0, verbose_name='Autorisation de séjour (pour les personnes étrangères)'),
|
||||
field=models.PositiveSmallIntegerField(blank=True, choices=[(0, 'Pas nécessaire'), (1, 'Nécessaire - OK'), (2, 'Manquante')], default=0, verbose_name='Autor. de séjour (pour les pers. étrang.)'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='candidate',
|
||||
|
|
|
|||
16
candidats/migrations/0005_rename_candidat_field.py
Normal file
16
candidats/migrations/0005_rename_candidat_field.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('candidats', '0004_complement_ede_fields'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RenameField(
|
||||
model_name='candidate',
|
||||
old_name='certif_800_general',
|
||||
new_name='certif_of_800_general',
|
||||
),
|
||||
]
|
||||
|
|
@ -107,9 +107,9 @@ class Candidate(models.Model):
|
|||
total_result_points = models.PositiveSmallIntegerField('Total points', blank=True, null=True)
|
||||
total_result_mark = models.PositiveSmallIntegerField('Note finale', blank=True, null=True)
|
||||
|
||||
inscr_other_school = models.CharField("Inscr. autre école", max_length=30, default='')
|
||||
inscr_other_school = models.CharField("Inscr. autre école", max_length=30, blank=True)
|
||||
certif_of_800_childhood = models.BooleanField("Attest. 800h. enfance", default=False)
|
||||
certif_800_general = models.BooleanField("Attest. 800h. général", default=False)
|
||||
certif_of_800_general = models.BooleanField("Attest. 800h. général", default=False)
|
||||
diploma = models.PositiveSmallIntegerField('Titre sec. II', choices=DIPLOMA_CHOICES, default=0)
|
||||
diploma_detail = models.CharField('Détail titre', max_length=30, blank=True, default='')
|
||||
diploma_status = models.PositiveSmallIntegerField("Statut titre", choices=DIPLOMA_STATUS_CHOICES, default=0)
|
||||
|
|
@ -118,7 +118,7 @@ class Candidate(models.Model):
|
|||
|
||||
aes_accords = models.PositiveSmallIntegerField("Accord AES", choices=AES_ACCORDS_CHOICES, default=0)
|
||||
residence_permits = models.PositiveSmallIntegerField(
|
||||
"Autorisation de séjour (pour les personnes étrangères)",
|
||||
"Autor. de séjour (pour les pers. étrang.)",
|
||||
choices=RESIDENCE_PERMITS_CHOICES, blank=True, default=0
|
||||
)
|
||||
accepted = models.BooleanField('Admis', default=False)
|
||||
|
|
@ -170,7 +170,8 @@ class Interview(models.Model):
|
|||
def __str__(self):
|
||||
return '{0} : {1}/{2} - ({3}) -salle:{4}-{5}'.format(
|
||||
self.date_formatted,
|
||||
self.teacher_int or '?', self.teacher_file or '?',
|
||||
self.teacher_int.abrev if self.teacher_int else '?',
|
||||
self.teacher_file.abrev if self.teacher_file else '?',
|
||||
self.status, self.room, self.candidat or '???'
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ class InscriptionSummaryPDF(EpcBaseDocTemplate):
|
|||
data.append(['Attestation de 800h. min. domaine Enfance',candidate.get_ok('certif_of_800_childhood')])
|
||||
data.append(["Bilan de l'activité professionnelle", candidate.get_ok('work_certificate')])
|
||||
elif candidate.diploma == 3 or candidate.diploma == 4: # Matu. aca ou ECG ou Portfolio
|
||||
data.append(['Attestation de 800h. min. domaine Général', candidate.get_ok('certif_800_general')])
|
||||
data.append(['Attestation de 800h. min. domaine Général', candidate.get_ok('certif_of_800_general')])
|
||||
data.append(['Attestation de 800h. min. domaine Enfance', candidate.get_ok('certif_of_800_childhood')])
|
||||
data.append(["Bilan de l'activité professionnelle", candidate.get_ok('work_certificate')])
|
||||
|
||||
|
|
|
|||
|
|
@ -26,14 +26,14 @@ class CandidateTests(TestCase):
|
|||
email='henri@example.org', deposite_date=date.today()
|
||||
)
|
||||
t1 = Teacher.objects.create(first_name="Julie", last_name="Caux", abrev="JCA")
|
||||
t2 = Teacher.objects.create(first_name='Jeanne', last_name='Dubois')
|
||||
t2 = Teacher.objects.create(first_name='Jeanne', last_name='Dubois', abrev="JDU")
|
||||
inter.teacher_int = t1
|
||||
inter.teacher_file = t2
|
||||
inter.candidat = cand
|
||||
inter.save()
|
||||
self.assertEqual(
|
||||
str(inter),
|
||||
'samedi 10 mars 2018 à 10h30 : Caux Julie/Dubois Jeanne - (N) -salle:B103-Dupond Henri'
|
||||
'samedi 10 mars 2018 à 10h30 : JCA/JDU - (N) -salle:B103-Dupond Henri'
|
||||
)
|
||||
self.assertEqual(cand.interview, inter)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue