mirror of
https://github.com/yyhuni/xingrin.git
synced 2026-02-02 20:53:13 +08:00
30 lines
734 B
Python
30 lines
734 B
Python
"""
|
||
通知系统 URL 配置
|
||
"""
|
||
|
||
from django.urls import path
|
||
from . import views
|
||
from .views import (
|
||
NotificationCollectionView,
|
||
NotificationMarkAllAsReadView,
|
||
NotificationUnreadCountView,
|
||
)
|
||
|
||
app_name = 'notifications'
|
||
|
||
urlpatterns = [
|
||
# 通知列表
|
||
path('', NotificationCollectionView.as_view(), name='list'),
|
||
|
||
# 未读数量
|
||
path('unread-count/', NotificationUnreadCountView.as_view(), name='unread-count'),
|
||
|
||
# 标记全部已读
|
||
path('mark-all-as-read/', NotificationMarkAllAsReadView.as_view(), name='mark-all-as-read'),
|
||
|
||
# 测试通知
|
||
path('test/', views.notifications_test, name='test'),
|
||
]
|
||
|
||
# WebSocket 实时通知路由在 routing.py 中定义:ws://host/ws/notifications/
|