etat poste
[auf_rh_dae.git] / project / dae / admin.py
1 # -*- encoding: utf-8 -*-
2
3 from django.contrib import admin
4 from reversion.admin import VersionAdmin
5 from models import Poste, Dossier
6
7 class PosteAdmin(VersionAdmin):
8 list_display = ('nom', 'implantation', 'etat', )
9
10 class DossierAdmin(VersionAdmin):
11 list_display = ('_poste', '_implantation', 'employe', 'etat', )
12
13 def _poste(self, obj):
14 return obj.poste.nom
15
16 def _implantation(self, obj):
17 return obj.poste.implantation
18
19 admin.site.register(Poste, PosteAdmin)
20 admin.site.register(Dossier, DossierAdmin)