admin.py 3.29 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
    AssoOption,
    MailMessageOption,
40
    HomeOption,
41
    RadiusKey,
42
    SwitchManagementCred,
43 44
    Reminder,
    DocumentTemplate
Gabriel Detraz's avatar
Gabriel Detraz committed
45
)
46

47 48

class OptionalUserAdmin(VersionAdmin):
49
    """Class admin options user"""
50 51
    pass

52

53
class OptionalTopologieAdmin(VersionAdmin):
54
    """Class admin options topologie"""
55 56
    pass

57

58
class OptionalMachineAdmin(VersionAdmin):
59
    """Class admin options machines"""
60 61
    pass

62

63
class GeneralOptionAdmin(VersionAdmin):
64
    """Class admin options générales"""
65 66
    pass

67

68
class ServiceAdmin(VersionAdmin):
69
    """Class admin gestion des services de la page d'accueil"""
70 71
    pass

72

73
class MailContactAdmin(VersionAdmin):
74
    """Admin class for contact email adresses"""
75 76 77
    pass


78
class AssoOptionAdmin(VersionAdmin):
79
    """Class admin options de l'asso"""
80
    pass
81

82

83
class MailMessageOptionAdmin(VersionAdmin):
84
    """Class admin options mail"""
85 86
    pass

87

Gabriel Detraz's avatar
Gabriel Detraz committed
88 89 90 91 92
class HomeOptionAdmin(VersionAdmin):
    """Class admin options home"""
    pass


93 94 95 96
class RadiusKeyAdmin(VersionAdmin):
    """Class radiuskey"""
    pass

97 98 99 100
class SwitchManagementCredAdmin(VersionAdmin):
    """Class managementcred for switch"""
    pass

101 102 103
class ReminderAdmin(VersionAdmin):
    """Class reminder for switch"""
    pass
104

105 106 107 108 109 110

class DocumentTemplateAdmin(VersionAdmin):
    """Admin class for DocumentTemplate"""
    pass


111 112
admin.site.register(OptionalUser, OptionalUserAdmin)
admin.site.register(OptionalMachine, OptionalMachineAdmin)
113
admin.site.register(OptionalTopologie, OptionalTopologieAdmin)
114
admin.site.register(GeneralOption, GeneralOptionAdmin)
Gabriel Detraz's avatar
Gabriel Detraz committed
115
admin.site.register(HomeOption, HomeOptionAdmin)
116
admin.site.register(Service, ServiceAdmin)
117
admin.site.register(MailContact, MailContactAdmin)
118 119
admin.site.register(Reminder, ReminderAdmin)
admin.site.register(RadiusKey, RadiusKeyAdmin)
120
admin.site.register(SwitchManagementCred, SwitchManagementCredAdmin)
121
admin.site.register(AssoOption, AssoOptionAdmin)
122
admin.site.register(MailMessageOption, MailMessageOptionAdmin)
123
admin.site.register(DocumentTemplate, DocumentTemplateAdmin)