Ajout modele OffreEmploiEvaluateur et la mécanique
[auf_rh_dae.git] / project / recrutement / migrations / 0006_convert_candidatevaluation.py
1 # encoding: utf-8
2 import datetime
3 from south.db import db
4 from south.v2 import DataMigration
5 from django.db import models
6
7 class Migration(DataMigration):
8
9 def forwards(self, orm):
10 "Write your forwards methods here."
11 for ce in orm.CandidatEvaluation.objects.all():
12 orm.OffreEmploiEvaluateur.objects.get_or_create(
13 offre_emploi=ce.candidat.offre_emploi,
14 evaluateur=ce.evaluateur
15 )
16
17 def backwards(self, orm):
18 "Write your backwards methods here."
19
20 models = {
21 'auth.group': {
22 'Meta': {'object_name': 'Group'},
23 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
24 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
25 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
26 },
27 'auth.permission': {
28 'Meta': {'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
29 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
30 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
31 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
32 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
33 },
34 'auth.user': {
35 'Meta': {'object_name': 'User'},
36 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
37 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
38 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
39 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
40 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
41 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
42 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
43 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
44 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
45 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
46 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
47 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
48 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
49 },
50 'contenttypes.contenttype': {
51 'Meta': {'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
52 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
53 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
54 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
55 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
56 },
57 'emploi.candidat': {
58 'Meta': {'object_name': 'Candidat'},
59 'actif': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
60 'adresse': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
61 'code_postal': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
62 'date_creation': ('django.db.models.fields.DateField', [], {'auto_now_add': 'True', 'blank': 'True'}),
63 'domaine_professionnel': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
64 'email': ('django.db.models.fields.EmailField', [], {'max_length': '255'}),
65 'employeur_actuel': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
66 'etat_province': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
67 'genre': ('django.db.models.fields.CharField', [], {'max_length': '1'}),
68 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
69 'nationalite': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'db_column': "'nationalite'", 'to': "orm['references.Pays']"}),
70 'niveau_diplome': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
71 'nom': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
72 'nombre_dependant': ('django.db.models.fields.IntegerField', [], {}),
73 'offre_emploi': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'db_column': "'offre_emploi'", 'to': "orm['emploi.OffreEmploi']"}),
74 'pays': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'db_column': "'pays'", 'to': "orm['references.Pays']"}),
75 'poste_actuel': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
76 'prenom': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
77 'situation_famille': ('django.db.models.fields.CharField', [], {'max_length': '1'}),
78 'statut': ('django.db.models.fields.CharField', [], {'default': "'NOUV'", 'max_length': '4'}),
79 'telephone': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
80 'ville': ('django.db.models.fields.CharField', [], {'max_length': '255'})
81 },
82 'emploi.offreemploi': {
83 'Meta': {'object_name': 'OffreEmploi'},
84 'actif': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
85 'bureau': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['references.Bureau']", 'db_column': "'bureau'"}),
86 'date_creation': ('django.db.models.fields.DateField', [], {'auto_now_add': 'True', 'blank': 'True'}),
87 'date_limite': ('django.db.models.fields.DateField', [], {}),
88 'debut_affectation': ('django.db.models.fields.DateField', [], {}),
89 'description': ('django.db.models.fields.TextField', [], {}),
90 'duree_affectation': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
91 'est_affiche': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
92 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
93 'lieu_affectation': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['references.Implantation']", 'db_column': "'implantation'"}),
94 'nom': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
95 'poste': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
96 'poste_nom': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
97 'region': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['references.Region']", 'db_column': "'region'"}),
98 'renumeration': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
99 'resume': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
100 'statut': ('django.db.models.fields.CharField', [], {'default': "'NOUV'", 'max_length': '4'})
101 },
102 'recrutement.candidat': {
103 'Meta': {'object_name': 'Candidat', 'db_table': "'emploi_candidat'", '_ormbases': ['emploi.Candidat']}
104 },
105 'recrutement.candidatcourriel': {
106 'Meta': {'object_name': 'CandidatCourriel'},
107 'candidats': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['emploi.Candidat']", 'symmetrical': 'False'}),
108 'html': ('tinymce.models.HTMLField', [], {'null': 'True', 'blank': 'True'}),
109 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
110 'plain_text': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
111 'sujet': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
112 'template': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'db_column': "'template'", 'to': "orm['recrutement.CourrielTemplate']"})
113 },
114 'recrutement.candidatevaluation': {
115 'Meta': {'object_name': 'CandidatEvaluation'},
116 'candidat': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'evaluations'", 'db_column': "'candidat'", 'to': "orm['emploi.Candidat']"}),
117 'commentaire': ('django.db.models.fields.TextField', [], {'default': "'Aucun'", 'null': 'True', 'blank': 'True'}),
118 'date': ('django.db.models.fields.DateField', [], {'auto_now_add': 'True', 'blank': 'True'}),
119 'evaluateur': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'db_column': "'evaluateur'", 'to': "orm['recrutement.Evaluateur']"}),
120 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
121 'note': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'})
122 },
123 'recrutement.courrieltemplate': {
124 'Meta': {'object_name': 'CourrielTemplate'},
125 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
126 'nom_modele': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
127 'plain_text': ('django.db.models.fields.TextField', [], {}),
128 'sujet': ('django.db.models.fields.CharField', [], {'max_length': '100'})
129 },
130 'recrutement.evaluateur': {
131 'Meta': {'object_name': 'Evaluateur'},
132 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
133 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'unique': 'True'})
134 },
135 'recrutement.offreemploievaluateur': {
136 'Meta': {'unique_together': "(('offre_emploi', 'evaluateur'),)", 'object_name': 'OffreEmploiEvaluateur'},
137 'evaluateur': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['recrutement.Evaluateur']", 'db_column': "'evaluateur'"}),
138 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
139 'offre_emploi': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['emploi.OffreEmploi']", 'db_column': "'offre_emploi'"})
140 },
141 'references.bureau': {
142 'Meta': {'object_name': 'Bureau', 'db_table': "u'ref_bureau'", 'managed': 'False'},
143 'actif': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
144 'code': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
145 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
146 'implantation': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['references.Implantation']", 'db_column': "'implantation'"}),
147 'nom': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
148 'nom_court': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
149 'nom_long': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
150 'region': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['references.Region']", 'db_column': "'region'"})
151 },
152 'references.implantation': {
153 'Meta': {'object_name': 'Implantation', 'db_table': "u'ref_implantation'", 'managed': 'False'},
154 'actif': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
155 'adresse_physique_bureau': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
156 'adresse_physique_code_postal': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
157 'adresse_physique_code_postal_avant_ville': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
158 'adresse_physique_no': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
159 'adresse_physique_pays': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'impl_adresse_physique'", 'to_field': "'code'", 'db_column': "'adresse_physique_pays'", 'to': "orm['references.Pays']"}),
160 'adresse_physique_precision': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
161 'adresse_physique_precision_avant': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
162 'adresse_physique_region': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
163 'adresse_physique_rue': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
164 'adresse_physique_ville': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
165 'adresse_postale_boite_postale': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
166 'adresse_postale_bureau': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
167 'adresse_postale_code_postal': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}),
168 'adresse_postale_code_postal_avant_ville': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
169 'adresse_postale_no': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}),
170 'adresse_postale_pays': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'impl_adresse_postale'", 'to_field': "'code'", 'db_column': "'adresse_postale_pays'", 'to': "orm['references.Pays']"}),
171 'adresse_postale_precision': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
172 'adresse_postale_precision_avant': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
173 'adresse_postale_region': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
174 'adresse_postale_rue': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
175 'adresse_postale_ville': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
176 'bureau_rattachement': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['references.Implantation']", 'db_column': "'bureau_rattachement'"}),
177 'code_meteo': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
178 'commentaire': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
179 'courriel': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
180 'courriel_interne': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
181 'date_extension': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}),
182 'date_fermeture': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}),
183 'date_inauguration': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}),
184 'date_ouverture': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}),
185 'fax': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
186 'fax_interne': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
187 'fuseau_horaire': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
188 'hebergement_convention': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}),
189 'hebergement_convention_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}),
190 'hebergement_etablissement': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
191 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
192 'modif_date': ('django.db.models.fields.DateField', [], {}),
193 'nom': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
194 'nom_court': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
195 'nom_long': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
196 'region': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['references.Region']", 'db_column': "'region'"}),
197 'remarque': ('django.db.models.fields.TextField', [], {}),
198 'responsable_implantation': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
199 'statut': ('django.db.models.fields.IntegerField', [], {}),
200 'telephone': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
201 'telephone_interne': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
202 'type': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
203 'url': ('django.db.models.fields.URLField', [], {'max_length': '255', 'blank': 'True'}),
204 'zone_administrative': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['references.ZoneAdministrative']"})
205 },
206 'references.pays': {
207 'Meta': {'object_name': 'Pays', 'db_table': "u'ref_pays'", 'managed': 'False'},
208 'actif': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
209 'code': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '2'}),
210 'code_bureau': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['references.Bureau']", 'to_field': "'code'", 'null': 'True', 'db_column': "'code_bureau'", 'blank': 'True'}),
211 'code_iso3': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '3'}),
212 'developpement': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
213 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
214 'monnaie': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
215 'nom': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
216 'nord_sud': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
217 'region': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['references.Region']", 'db_column': "'region'"})
218 },
219 'references.region': {
220 'Meta': {'object_name': 'Region', 'db_table': "u'ref_region'", 'managed': 'False'},
221 'actif': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
222 'code': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
223 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
224 'implantation_bureau': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'gere_region'", 'null': 'True', 'db_column': "'implantation_bureau'", 'to': "orm['references.Implantation']"}),
225 'nom': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'})
226 },
227 'references.zoneadministrative': {
228 'Meta': {'object_name': 'ZoneAdministrative', 'db_table': "'ref_zoneadministrative'", 'managed': 'False'},
229 'actif': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
230 'code': ('django.db.models.fields.CharField', [], {'max_length': '4', 'primary_key': 'True'}),
231 'nom': ('django.db.models.fields.CharField', [], {'max_length': '100'})
232 }
233 }
234
235 complete_apps = ['recrutement']