from recrutement import models as recr
from auf.django.emploi import forms as emploi
-
-
################################################################################
# EVALUATION
################################################################################
def save(self):
candidats = recr.Candidat.objects.\
filter(offre_emploi__in=self.offres_emploi)
- import pdb;pdb.set_trace()
for candidat in candidats:
for evaluateur in self.cleaned_data.get('evaluateurs', []):
candidat_evaluation = recr.CandidatEvaluation()
class PostulerOffreEmploiForm(emploi.PostulerOffreEmploiForm):
pass
-"""class OffreEmploiForm(emploi.OffreEmploi):
+class OffreEmploiForm(ModelForm):
+ class Meta:
+ model = recr.OffreEmploi
+
def clean(self):
cleaned_data = self.cleaned_data
date_limite = cleaned_data.get("date_limite")
if date_limite and debut_affectation:
if date_limite > debut_affectation:
- raise forms.ValidationError("La date limite doit être \
- ultérieure à la date de début d'affectation.")
+ raise forms.ValidationError("La date limite ne peut être \
+ supérieure à la date d'affection.")
+
return cleaned_data
-"""
+
################################################################################
# TEMPLATE COURRIEL
################################################################################