mirror of
https://gitlab.crans.org/mediatek/med.git
synced 2024-11-27 03:33:02 +00:00
31 lines
838 B
Python
31 lines
838 B
Python
# -*- mode: python; coding: utf-8 -*-
|
|
# Copyright (C) 2017-2019 by BDE ENS Paris-Saclay
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
from django.contrib import admin
|
|
from reversion.admin import VersionAdmin
|
|
|
|
from .models import Auteur, Emprunt, Media, Jeu
|
|
|
|
|
|
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')
|
|
|
|
|
|
class JeuAdmin(VersionAdmin):
|
|
list_display = ('nom', 'proprietaire', 'duree', 'nombre_joueurs_min', 'nombre_joueurs_max', 'comment')
|
|
|
|
|
|
admin.site.register(Auteur, AuteurAdmin)
|
|
admin.site.register(Media, MediaAdmin)
|
|
admin.site.register(Emprunt, EmpruntAdmin)
|
|
admin.site.register(Jeu, JeuAdmin)
|