urls.py
1.1 KB
# _*_ coding: utf-8 _*_
# @Time : 2020/9/30 11:18
# @Author vanwhebin
from django.urls import path, include
from rest_framework import routers
from .views import AuditorViewSet, ProgramViewSet, AuditorListView, ResultViewSet
from .views_cbv import CreateProject, ProjectDetail, AuditProjectsList, AuditProject, CheckAuth
router = routers.DefaultRouter()
router.register(r'auditor', AuditorViewSet, basename="auditor")
router.register(r'program', ProgramViewSet, basename="program")
router.register(r'result', ResultViewSet, basename="result")
app_name = "project"
urlpatterns = [
path('', include(router.urls)),
# re_path(r'auditor', AuditorListView.as_view()),
# re_path(r'auditor/<int:pk>', AuditorListView.as_view()),
path('create', CreateProject.as_view(), name="create_project"),
path('audit/<int:pk>', AuditProject.as_view(), name="audit_project"),
path('right/<int:pk>', CheckAuth.as_view(), name="check_audit_auth"),
path('list', AuditProjectsList.as_view(), name="list_projects"),
path('<int:pk>', ProjectDetail.as_view(), name="retrieve_project"),
]