Files
jumpserver/apps/notifications/urls/api_urls.py
fit2bot 79cabe1b3c feat: setting email template content (#15974)
* feat: setting email template content

* perf: tempale list

* perf: custom template render to string

* perf: content serialize valid

* perf: Custom msg template base class

* perf: Template content reset

* perf: Update templates config

* perf: Remove useless code

---------

Co-authored-by: wangruidong <940853815@qq.com>
2025-09-10 16:49:52 +08:00

23 lines
772 B
Python

from django.conf import settings
from django.urls import path
from rest_framework_bulk.routes import BulkRouter
from notifications import api
app_name = 'notifications'
router = BulkRouter()
router.register('system-msg-subscription', api.SystemMsgSubscriptionViewSet, 'system-msg-subscription')
router.register('user-msg-subscription', api.UserMsgSubscriptionViewSet, 'user-msg-subscription')
router.register('site-messages', api.SiteMessageViewSet, 'site-message')
router.register('templates', api.TemplateViewSet, 'template')
urlpatterns = [
path('backends/', api.BackendListView.as_view(), name='backends'),
]
urlpatterns += router.urls
if settings.DEBUG:
urlpatterns += [
path('debug-msgs/', api.get_all_test_messages, name='debug-all-msgs')
]