# -*- encoding: utf-8 -*-
+import textwrap
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect
from django.contrib import admin
search_fields = ('nom', 'prenom' )
exclude = ('actif', )
list_editable = ('statut', )
- list_display = ('nom', 'prenom', 'offre_emploi',
+ list_display = ('_candidat', 'offre_emploi',
'voir_offre_emploi', 'calculer_moyenne',
'afficher_candidat', '_date_creation', 'statut', )
list_filter = ('offre_emploi', 'offre_emploi__region', 'statut', )
CandidatPieceInline,
CandidatEvaluationInline,
]
-
actions = ['envoyer_courriel_candidats']
+ def _candidat(self, obj):
+ txt = u"%s %s (%s)" % ( obj.nom.upper(), obj.prenom,
+ obj.genre)
+ txt = textwrap.wrap(txt, 30)
+ return "<br/>".join(txt)
+ _candidat.short_description = "Candidat"
+ _candidat.admin_order_field = "nom"
+ _candidat.allow_tags = True
+
def _date_creation(self, obj):
return obj.date_creation
- _date_creation.order_field = "date_creation"
- _date_creation.short_description = "Date de création"
+ _date_creation.admin_order_field = "date_creation"
+ _date_creation.short_description = "Date de réception"
### Actions à afficher
def get_actions(self, request):