From e455e1aabc8c7aba2ea6179f1e0cf458ed72b7a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BA=B7=E5=AE=B6=E8=BE=89?= Date: Sun, 24 Apr 2022 17:58:03 +0800 Subject: [PATCH] 1 --- ITShowPlatform/urls.py | 3 --- history/urls.py | 4 +++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/ITShowPlatform/urls.py b/ITShowPlatform/urls.py index a66ee19..4f11486 100644 --- a/ITShowPlatform/urls.py +++ b/ITShowPlatform/urls.py @@ -27,7 +27,4 @@ urlpatterns = [ path('api/', include('history.urls')), path(r'^api-auth/', include('rest_framework.urls')), re_path(r'^media/(?P.*)', serve, {"document_root": settings.MEDIA_ROOT}), - path('api/department/', DepartmentViewSet.as_view()), - path('api/member/', MemberViewSet.as_view()), - path('api/history_list/', HistoryViewSet.as_view()), ] diff --git a/history/urls.py b/history/urls.py index e756792..6d8989b 100644 --- a/history/urls.py +++ b/history/urls.py @@ -4,5 +4,7 @@ from django.urls import path from history.views import DepartmentViewSet, MemberViewSet, HistoryViewSet urlpatterns = [ - + path('department/', DepartmentViewSet.as_view()), + path('member/', MemberViewSet.as_view()), + path('history_list/', HistoryViewSet.as_view()), ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)