Ce serveur Gitlab sera éteint le 30 juin 2020, pensez à migrer vos projets vers les serveurs gitlab-research.centralesupelec.fr et gitlab-student.centralesupelec.fr !

admin.py 2.65 KB
Newer Older
1
# -*- mode: python; coding: utf-8 -*-
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
# Re2o est un logiciel d'administration développé initiallement au rezometz. Il
# se veut agnostique au réseau considéré, de manière à être installable en
# quelques clics.
#
# Copyright © 2017  Gabriel Détraz
# Copyright © 2017  Goulven Kermarec
# Copyright © 2017  Augustin Lemesle
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 24 25
"""
Classes admin pour les models de preferences
"""
26 27
from __future__ import unicode_literals

28
from django.contrib import admin
29 30
from reversion.admin import VersionAdmin

Gabriel Detraz's avatar
Gabriel Detraz committed
31 32 33 34 35 36
from .models import (
    OptionalUser,
    OptionalMachine,
    OptionalTopologie,
    GeneralOption,
    Service,
37
    MailContact,
Gabriel Detraz's avatar
Gabriel Detraz committed
38 39 40 41
    AssoOption,
    MailMessageOption,
    HomeOption
)
42

43 44

class OptionalUserAdmin(VersionAdmin):
45
    """Class admin options user"""
46 47
    pass

48

49
class OptionalTopologieAdmin(VersionAdmin):
50
    """Class admin options topologie"""
51 52
    pass

53

54
class OptionalMachineAdmin(VersionAdmin):
55
    """Class admin options machines"""
56 57
    pass

58

59
class GeneralOptionAdmin(VersionAdmin):
60
    """Class admin options générales"""
61 62
    pass

63

64
class ServiceAdmin(VersionAdmin):
65
    """Class admin gestion des services de la page d'accueil"""
66 67
    pass

68

69
class MailContactAdmin(VersionAdmin):
70
    """Admin class for contact email adresses"""
71 72 73
    pass


74
class AssoOptionAdmin(VersionAdmin):
75
    """Class admin options de l'asso"""
76
    pass
77

78

79
class MailMessageOptionAdmin(VersionAdmin):
80
    """Class admin options mail"""
81 82
    pass

83

Gabriel Detraz's avatar
Gabriel Detraz committed
84 85 86 87 88
class HomeOptionAdmin(VersionAdmin):
    """Class admin options home"""
    pass


89 90
admin.site.register(OptionalUser, OptionalUserAdmin)
admin.site.register(OptionalMachine, OptionalMachineAdmin)
91
admin.site.register(OptionalTopologie, OptionalTopologieAdmin)
92
admin.site.register(GeneralOption, GeneralOptionAdmin)
Gabriel Detraz's avatar
Gabriel Detraz committed
93
admin.site.register(HomeOption, HomeOptionAdmin)
94
admin.site.register(Service, ServiceAdmin)
95
admin.site.register(MailContact, MailContactAdmin)
96
admin.site.register(AssoOption, AssoOptionAdmin)
97
admin.site.register(MailMessageOption, MailMessageOptionAdmin)