diff --git a/candidats/admin.py b/candidats/admin.py index 263bc30..f6feb8e 100644 --- a/candidats/admin.py +++ b/candidats/admin.py @@ -63,7 +63,7 @@ class CandidateAdmin(admin.ModelAdmin): form = CandidateForm list_display = ('last_name', 'first_name', 'section', 'confirm_mail', 'validation_mail', 'convocation_mail', 'convoc_confirm_receipt_OK') - list_filter = ('section', 'option') + list_filter = ('section', 'option', 'session') search_fields = ('last_name', 'city') readonly_fields = ( 'total_result', 'confirmation_date', 'convocation_date', 'candidate_actions' @@ -75,7 +75,7 @@ class CandidateAdmin(admin.ModelAdmin): ('street', 'pcode', 'city', 'district'), ('mobile', 'email'), ('birth_date', 'avs', 'handicap'), - ('section', 'option'), + ('section', 'option', 'session'), ('corporation', 'instructor'), ('deposite_date', 'confirmation_date', 'canceled_file'), 'comment', diff --git a/candidats/migrations/0013_candidate_session.py b/candidats/migrations/0013_candidate_session.py new file mode 100644 index 0000000..ff904c9 --- /dev/null +++ b/candidats/migrations/0013_candidate_session.py @@ -0,0 +1,26 @@ +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('candidats', '0012_model_adapts_dec_2022'), + ] + + operations = [ + migrations.AddField( + model_name='candidate', + name='session', + field=models.PositiveSmallIntegerField(blank=True, choices=[(2024, 'Année 2024'), (2025, 'Année 2025'), (2026, 'Année 2026')], null=True), + ), + migrations.AlterField( + model_name='candidate', + name='option', + field=models.CharField(blank=True, choices=[('GEN', 'Généraliste'), ('ENF', 'Enfance'), ('PAG', 'Personnes âgées'), ('HAN', 'Handicap'), ('PE-5400h', 'Voie duale 5400h.'), ('PE-3600h', 'Voie duale 3600h.'), ('PS-3600h', 'Voie stages intégrés 3600h.'), ('PS', 'Voie stages intégrés 5400h.')], max_length=20, verbose_name='Option'), + ), + migrations.AlterField( + model_name='candidate', + name='section', + field=models.CharField(choices=[('ASA', 'Aide en soin et accompagnement AFP'), ('ASE', 'Assist. socio-éducatif-ve CFC'), ('ASSC', 'Assist. en soin et santé communautaire CFC'), ('EDE', 'Education de l’enfance, dipl. ES'), ('EDS', 'Education sociale, dipl. ES'), ('MSP', 'Maitrise socioprofessionnelle, dipl. ES')], max_length=10, verbose_name='Filière'), + ), + ] diff --git a/candidats/models.py b/candidats/models.py index 1f61ca7..3a978c0 100644 --- a/candidats/models.py +++ b/candidats/models.py @@ -16,6 +16,7 @@ SECTION_CHOICES = ( ('ASSC', 'Assist. en soin et santé communautaire CFC'), ('EDE', "Education de l’enfance, dipl. ES"), ('EDS', 'Education sociale, dipl. ES'), + ('MSP', "Maitrise socioprofessionnelle, dipl. ES"), ) OPTION_CHOICES = ( @@ -23,10 +24,16 @@ OPTION_CHOICES = ( ('ENF', 'Enfance'), ('PAG', 'Personnes âgées'), ('HAN', 'Handicap'), - ('PE-5400h', 'Parcours Emploi 5400h.'), - ('PE-3600h', 'Parcours Emploi 3600h.'), - ('PS-3600h', 'Parcours stage 3600h.'), - ('PS', 'Parcours stage 5400h.'), + ('PE-5400h', 'Voie duale 5400h.'), + ('PE-3600h', 'Voie duale 3600h.'), + ('PS-3600h', 'Voie stages intégrés 3600h.'), + ('PS', 'Voie stages intégrés 5400h.'), +) + +SESSION_CHOICES = ( + (2024, "Année 2024"), + (2025, "Année 2025"), + (2026, "Année 2026"), ) DIPLOMA_CHOICES = ( @@ -75,6 +82,8 @@ class Candidate(models.Model): section = models.CharField('Filière', max_length=10, choices=SECTION_CHOICES) option = models.CharField('Option', max_length=20, choices=OPTION_CHOICES, blank=True) + # Maybe remove null/blank when field is completely populated + session = models.PositiveSmallIntegerField(choices=SESSION_CHOICES, blank=True, null=True) exemption_ecg = models.BooleanField(default=False) validation_sfpo = models.DateField('Confirmation SFPO', blank=True, null=True) integration_second_year = models.BooleanField('Intégration', default=False)