mirror of
https://github.com/jumpserver/jumpserver.git
synced 2026-03-19 19:42:07 +00:00
* 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>
23 lines
772 B
Python
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')
|
|
]
|