diff options
author | Palaparthy Adityachandra | 2020-04-30 17:39:44 +0530 |
---|---|---|
committer | GitHub | 2020-04-30 17:39:44 +0530 |
commit | 833b96ac49499810934ada8ba02750623455d0cd (patch) | |
tree | 16d974b5a5e1effaf15be2235813dca4108c4f29 /api/urls.py | |
parent | 53a0c4ad3e733f3960000527f83565f2fd8fc412 (diff) | |
parent | 2fd29bf1fff3d57a49b8a5cdffa9efc305946214 (diff) | |
download | online_test-833b96ac49499810934ada8ba02750623455d0cd.tar.gz online_test-833b96ac49499810934ada8ba02750623455d0cd.tar.bz2 online_test-833b96ac49499810934ada8ba02750623455d0cd.zip |
Merge pull request #674 from CruiseDevice/API
Update Yaksh API
Diffstat (limited to 'api/urls.py')
-rw-r--r-- | api/urls.py | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/api/urls.py b/api/urls.py new file mode 100644 index 0000000..f519aea --- /dev/null +++ b/api/urls.py @@ -0,0 +1,33 @@ +from django.conf.urls import url +from rest_framework.urlpatterns import format_suffix_patterns +from api import views + +app_name = 'api' + +urlpatterns = [ + url(r'questions/$', views.QuestionList.as_view(), name='questions'), + url(r'questions/(?P<pk>[0-9]+)/$', views.QuestionDetail.as_view(), + name='question'), + url(r'get_courses/$', views.CourseList.as_view(), name='get_courses'), + url(r'start_quiz/(?P<course_id>[0-9]+)/(?P<quiz_id>[0-9]+)/$', views.StartQuiz.as_view(), + name='start_quiz'), + url(r'quizzes/$', views.QuizList.as_view(), name='quizzes'), + url(r'quizzes/(?P<pk>[0-9]+)/$', views.QuizDetail.as_view(), name='quiz'), + url(r'questionpapers/$', views.QuestionPaperList.as_view(), + name='questionpapers'), + url(r'questionpapers/(?P<pk>[0-9]+)/$', + views.QuestionPaperDetail.as_view(), name='questionpaper'), + url(r'answerpapers/$', views.AnswerPaperList.as_view(), + name='answerpapers'), + url(r'validate/(?P<answerpaper_id>[0-9]+)/(?P<question_id>[0-9]+)/$', + views.AnswerValidator.as_view(), name='validators'), + url(r'validate/(?P<uid>[0-9]+)/$', + views.AnswerValidator.as_view(), name='validator'), + url(r'course/(?P<pk>[0-9]+)/$', + views.GetCourse.as_view(), name='get_course'), + url(r'quit/(?P<answerpaper_id>\d+)/$', views.QuitQuiz.as_view(), + name="quit_quiz"), + url(r'login/$', views.login, name='login') +] + +urlpatterns = format_suffix_patterns(urlpatterns) |