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