Implement notification rules and settings

This commit is contained in:
2023-01-12 07:20:43 +00:00
parent a70bc16d22
commit f93d37d1c0
18 changed files with 545 additions and 77 deletions

View File

@@ -19,8 +19,9 @@ from django.contrib import admin
from django.urls import include, path
from django.views.generic import TemplateView
# Notification settings and rules
# Threshold API stuff
from core.views import About, Billing, Cancel, Order, Portal, Signup
from core.views import About, Billing, Cancel, Order, Portal, Signup, notifications
from core.views.callbacks import Callback
from core.views.manage.threshold.irc import (
ThresholdIRCNetworkList, # Actions and just get list output
@@ -261,4 +262,29 @@ urlpatterns = [
name="threshold_irc_msg",
),
##
path(
"notifications/<str:type>/update/",
notifications.NotificationsUpdate.as_view(),
name="notifications_update",
),
path(
"rules/<str:type>/",
notifications.RuleList.as_view(),
name="rules",
),
path(
"rule/<str:type>/create/",
notifications.RuleCreate.as_view(),
name="rule_create",
),
path(
"rule/<str:type>/update/<str:pk>/",
notifications.RuleUpdate.as_view(),
name="rule_update",
),
path(
"rule/<str:type>/delete/<str:pk>/",
notifications.RuleDelete.as_view(),
name="rule_delete",
),
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)