2017-06-30 01:25:07 +00:00
|
|
|
|
|
|
|
from reversion.admin import VersionAdmin
|
|
|
|
from django.contrib import admin
|
|
|
|
from django.contrib.auth.models import Group
|
|
|
|
|
2017-07-03 16:33:24 +00:00
|
|
|
from .models import Auteur, Emprunt, Media, Jeu
|
2017-06-30 01:25:07 +00:00
|
|
|
|
|
|
|
class AuteurAdmin(VersionAdmin):
|
|
|
|
list_display = ('nom',)
|
|
|
|
|
|
|
|
class MediaAdmin(VersionAdmin):
|
|
|
|
list_display = ('titre','cote')
|
|
|
|
|
|
|
|
class EmpruntAdmin(VersionAdmin):
|
|
|
|
list_display = ('media','user','date_emprunt', 'date_rendu', 'permanencier_emprunt', 'permanencier_rendu')
|
|
|
|
|
2017-07-03 16:33:24 +00:00
|
|
|
class JeuAdmin(VersionAdmin):
|
|
|
|
list_display = ('nom','proprietaire', 'duree', 'nombre_joueurs_min', 'nombre_joueurs_max', 'comment')
|
2017-06-30 01:25:07 +00:00
|
|
|
|
|
|
|
admin.site.register(Auteur, AuteurAdmin)
|
|
|
|
admin.site.register(Media, MediaAdmin)
|
|
|
|
admin.site.register(Emprunt, EmpruntAdmin)
|
2017-07-03 16:33:24 +00:00
|
|
|
admin.site.register(Jeu, JeuAdmin)
|