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