2017-09-10 14:53:02 +00:00
|
|
|
# -*- mode: python; coding: utf-8 -*-
|
2020-11-23 16:06:37 +00:00
|
|
|
# Re2o est un logiciel d'administration développé initiallement au Rézo Metz. Il
|
2017-08-24 19:36:59 +00:00
|
|
|
# se veut agnostique au réseau considéré, de manière à être installable en
|
|
|
|
# quelques clics.
|
|
|
|
#
|
|
|
|
# Copyright © 2017 Gabriel Détraz
|
2019-09-29 14:02:28 +00:00
|
|
|
# Copyright © 2017 Lara Kermarec
|
2017-08-24 19:36:59 +00:00
|
|
|
# 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.
|
2017-10-14 04:03:53 +00:00
|
|
|
"""
|
2020-05-30 09:22:55 +00:00
|
|
|
Admin classes for models of preferences app.
|
2017-10-14 04:03:53 +00:00
|
|
|
"""
|
2017-09-10 23:29:24 +00:00
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
2017-06-25 22:50:55 +00:00
|
|
|
from django.contrib import admin
|
2017-08-24 19:36:59 +00:00
|
|
|
from reversion.admin import VersionAdmin
|
|
|
|
|
2021-02-10 10:06:09 +00:00
|
|
|
from .models import (AssoOption, DocumentTemplate, GeneralOption, HomeOption,
|
2021-04-27 17:24:07 +00:00
|
|
|
MailContact, MailMessageOption, Mandate, OptionalMachine,
|
2021-02-10 10:06:09 +00:00
|
|
|
OptionalTopologie, OptionalUser, RadiusKey, Reminder,
|
|
|
|
Service, SwitchManagementCred)
|
2017-10-14 04:03:53 +00:00
|
|
|
|
2017-08-24 19:36:59 +00:00
|
|
|
|
|
|
|
class OptionalUserAdmin(VersionAdmin):
|
2020-05-30 09:22:55 +00:00
|
|
|
"""Admin class for user options."""
|
2019-11-04 16:55:03 +00:00
|
|
|
|
2017-08-24 19:36:59 +00:00
|
|
|
pass
|
|
|
|
|
2017-10-14 04:03:53 +00:00
|
|
|
|
2017-08-26 13:10:18 +00:00
|
|
|
class OptionalTopologieAdmin(VersionAdmin):
|
2020-05-30 09:22:55 +00:00
|
|
|
"""Admin class for topology options."""
|
2019-11-04 16:55:03 +00:00
|
|
|
|
2017-08-26 13:10:18 +00:00
|
|
|
pass
|
|
|
|
|
2017-10-14 04:03:53 +00:00
|
|
|
|
2017-08-24 19:36:59 +00:00
|
|
|
class OptionalMachineAdmin(VersionAdmin):
|
2020-05-30 09:22:55 +00:00
|
|
|
"""Admin class for machines options."""
|
2019-11-04 16:55:03 +00:00
|
|
|
|
2017-08-24 19:36:59 +00:00
|
|
|
pass
|
|
|
|
|
2017-10-14 04:03:53 +00:00
|
|
|
|
2017-08-24 19:36:59 +00:00
|
|
|
class GeneralOptionAdmin(VersionAdmin):
|
2020-05-30 09:22:55 +00:00
|
|
|
"""Admin class for general options."""
|
2019-11-04 16:55:03 +00:00
|
|
|
|
2017-08-24 19:36:59 +00:00
|
|
|
pass
|
|
|
|
|
2017-10-14 04:03:53 +00:00
|
|
|
|
2017-08-24 19:36:59 +00:00
|
|
|
class ServiceAdmin(VersionAdmin):
|
2020-05-30 09:22:55 +00:00
|
|
|
"""Admin class for services (on the homepage)."""
|
2019-11-04 16:55:03 +00:00
|
|
|
|
2017-08-24 19:36:59 +00:00
|
|
|
pass
|
|
|
|
|
2017-10-14 04:03:53 +00:00
|
|
|
|
2018-06-30 17:19:40 +00:00
|
|
|
class MailContactAdmin(VersionAdmin):
|
2020-05-30 09:22:55 +00:00
|
|
|
"""Admin class for contact email addresses."""
|
2019-11-04 16:55:03 +00:00
|
|
|
|
2018-06-30 17:19:40 +00:00
|
|
|
pass
|
|
|
|
|
|
|
|
|
2017-08-24 19:36:59 +00:00
|
|
|
class AssoOptionAdmin(VersionAdmin):
|
2020-05-30 09:22:55 +00:00
|
|
|
"""Admin class for organisation options."""
|
2019-11-04 16:55:03 +00:00
|
|
|
|
2017-08-24 19:36:59 +00:00
|
|
|
pass
|
2017-06-25 22:50:55 +00:00
|
|
|
|
2017-10-14 04:03:53 +00:00
|
|
|
|
2017-09-08 20:53:13 +00:00
|
|
|
class MailMessageOptionAdmin(VersionAdmin):
|
2020-05-30 09:22:55 +00:00
|
|
|
"""Admin class for email messages options."""
|
2019-11-04 16:55:03 +00:00
|
|
|
|
2017-09-08 20:53:13 +00:00
|
|
|
pass
|
|
|
|
|
2017-10-14 04:03:53 +00:00
|
|
|
|
2018-04-16 16:22:51 +00:00
|
|
|
class HomeOptionAdmin(VersionAdmin):
|
2020-05-30 09:22:55 +00:00
|
|
|
"""Admin class for home options."""
|
2019-11-04 16:55:03 +00:00
|
|
|
|
2018-04-16 16:22:51 +00:00
|
|
|
pass
|
|
|
|
|
|
|
|
|
2018-07-10 23:07:31 +00:00
|
|
|
class RadiusKeyAdmin(VersionAdmin):
|
2020-05-30 09:22:55 +00:00
|
|
|
"""Admin class for RADIUS keys options."""
|
2019-11-04 16:55:03 +00:00
|
|
|
|
2018-07-10 23:07:31 +00:00
|
|
|
pass
|
|
|
|
|
2019-11-04 16:55:03 +00:00
|
|
|
|
2018-07-11 00:19:29 +00:00
|
|
|
class SwitchManagementCredAdmin(VersionAdmin):
|
2020-05-30 09:22:55 +00:00
|
|
|
"""Admin class for switch management credentials options."""
|
2019-11-04 16:55:03 +00:00
|
|
|
|
2018-07-11 00:19:29 +00:00
|
|
|
pass
|
|
|
|
|
2019-11-04 16:55:03 +00:00
|
|
|
|
2018-09-19 21:24:03 +00:00
|
|
|
class ReminderAdmin(VersionAdmin):
|
2020-05-30 09:22:55 +00:00
|
|
|
"""Admin class for reminder options."""
|
2019-11-04 16:55:03 +00:00
|
|
|
|
2018-09-19 21:24:03 +00:00
|
|
|
pass
|
2018-07-10 23:07:31 +00:00
|
|
|
|
2019-01-20 23:54:02 +00:00
|
|
|
|
|
|
|
class DocumentTemplateAdmin(VersionAdmin):
|
2020-05-30 09:22:55 +00:00
|
|
|
"""Admin class for document templates."""
|
2019-11-04 16:55:03 +00:00
|
|
|
|
2019-01-20 23:54:02 +00:00
|
|
|
pass
|
|
|
|
|
|
|
|
|
2021-04-27 17:24:07 +00:00
|
|
|
class MandateAdmin(VersionAdmin):
|
|
|
|
"""Admin class for mandates."""
|
|
|
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
2017-08-24 19:36:59 +00:00
|
|
|
admin.site.register(OptionalUser, OptionalUserAdmin)
|
|
|
|
admin.site.register(OptionalMachine, OptionalMachineAdmin)
|
2017-08-26 13:10:18 +00:00
|
|
|
admin.site.register(OptionalTopologie, OptionalTopologieAdmin)
|
2017-08-24 19:36:59 +00:00
|
|
|
admin.site.register(GeneralOption, GeneralOptionAdmin)
|
2018-04-16 16:22:51 +00:00
|
|
|
admin.site.register(HomeOption, HomeOptionAdmin)
|
2017-08-24 19:36:59 +00:00
|
|
|
admin.site.register(Service, ServiceAdmin)
|
2018-06-30 17:19:40 +00:00
|
|
|
admin.site.register(MailContact, MailContactAdmin)
|
2018-07-10 23:07:31 +00:00
|
|
|
admin.site.register(Reminder, ReminderAdmin)
|
|
|
|
admin.site.register(RadiusKey, RadiusKeyAdmin)
|
2018-07-11 00:19:29 +00:00
|
|
|
admin.site.register(SwitchManagementCred, SwitchManagementCredAdmin)
|
2017-08-24 19:36:59 +00:00
|
|
|
admin.site.register(AssoOption, AssoOptionAdmin)
|
2017-09-08 20:53:13 +00:00
|
|
|
admin.site.register(MailMessageOption, MailMessageOptionAdmin)
|
2019-01-20 23:54:02 +00:00
|
|
|
admin.site.register(DocumentTemplate, DocumentTemplateAdmin)
|
2021-04-27 17:24:07 +00:00
|
|
|
admin.site.register(Mandate, MandateAdmin)
|