from django.urls import path from rest_framework.routers import DefaultRouter from trials.views import TestModelViewSet from trials.views import TestTemplateView from trials.views import TestValidateAPIView from trials.views import TestResultView, addTest, addQuestions, myTests, editTest, solvedTests router = DefaultRouter(trailing_slash=False) router.register("items", TestModelViewSet) urlpatterns = [ path('/show', TestTemplateView.as_view()), path('/mark', TestValidateAPIView.as_view()), path('/result', TestResultView.as_view()), path('/edit', editTest), path('add/test', addTest, name="newTest"), path('add/questions', addQuestions, name="addQuestions"), path('my', myTests, name="myTests"), path('solved', solvedTests, name="solvedTests") ] urlpatterns += router.urls