
功能特性: - JWT用户认证系统 - 日报CRUD管理 - 三级权限控制 - 多维度搜索过滤 - 统计分析功能 - 评论互动系统 - 响应式Cool Admin界面 - 暗色主题支持 技术栈: - 后端:Django 4.2.7 + DRF + SimpleJWT - 前端:Vue 3 + Element Plus + Pinia - 数据库:SQLite/PostgreSQL - 部署:Docker + Nginx 包含内容: - 完整的后端API代码 - 现代化前端界面 - 数据库迁移文件 - 部署脚本和文档 - 演示页面和测试工具
20 lines
801 B
Python
20 lines
801 B
Python
from django.urls import path
|
|
from . import views
|
|
|
|
app_name = 'daily_report'
|
|
|
|
urlpatterns = [
|
|
# 日报相关URL
|
|
path('reports/', views.DailyReportListCreateView.as_view(), name='report-list-create'),
|
|
path('reports/<int:pk>/', views.DailyReportDetailView.as_view(), name='report-detail'),
|
|
path('reports/<int:pk>/toggle-draft/', views.toggle_draft_status, name='toggle-draft'),
|
|
|
|
# 评论相关URL
|
|
path('reports/<int:report_id>/comments/', views.ReportCommentListCreateView.as_view(), name='comment-list-create'),
|
|
path('comments/<int:pk>/', views.ReportCommentDetailView.as_view(), name='comment-detail'),
|
|
|
|
# 统计相关URL
|
|
path('stats/', views.report_stats, name='report-stats'),
|
|
path('stats/users/', views.user_report_stats, name='user-report-stats'),
|
|
]
|