from flask_admin.contrib.sqla import ModelView
from geonature.utils.env import DB
from geonature.core.admin.utils import CruvedProtectedMixin
from geonature.core.notifications.models import NotificationCategory
[docs]
class NotificationTemplateAdmin(CruvedProtectedMixin, ModelView):
[docs]
object_code = "NOTIFICATIONS"
[docs]
column_list = ("code_category", "code_method", "content")
[docs]
column_labels = {
"code_category": "Catégorie",
"code_method": "Méthode d'envoi",
"content": "Contenu du template de notification",
}
[docs]
class NotificationCategoryAdmin(CruvedProtectedMixin, ModelView):
[docs]
object_code = "NOTIFICATIONS"
[docs]
column_list = ("code", "label", "description")
[docs]
class NotificationMethodAdmin(CruvedProtectedMixin, ModelView):
[docs]
object_code = "NOTIFICATIONS"
[docs]
column_list = ("code", "label", "description")