123456789101112131415161718 |
- # 添加路由
- from django.conf.urls import url
- from rest_framework_bulk.routes import BulkRouter
- from workreport.views import ReportView, DailyReportView, LoginView, LogoutView
- router = BulkRouter()
- router.register(r'dailyreport', DailyReportView)
- router.register(r'dailyreport1', DailyReportView)
- urlpatterns = router.urls
- urlpatterns += [
- url(r'report/<int:name>/', ReportView.as_view()),
- url(r'login/', LoginView.as_view()),
- url(r'logout/', LogoutView.as_view())
- ]
|