SOITA/trials/urls.py
2022-01-17 16:31:09 +01:00

21 lines
698 B
Python

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
router = DefaultRouter(trailing_slash=False)
router.register("items", TestModelViewSet)
urlpatterns = [
path('<int:test_id>/show', TestTemplateView.as_view()),
path('<int:test_id>/mark', TestValidateAPIView.as_view()),
path('<int:test_id>/result', TestResultView.as_view()),
path('add/test', addTest, name="newTest"),
path('add/questions', addQuestions, name="addQuestions")
]
urlpatterns += router.urls