diff options
author | prathamesh | 2018-12-19 13:46:40 +0530 |
---|---|---|
committer | prathamesh | 2018-12-19 13:46:40 +0530 |
commit | 0e3353d489fd54a2c84c712ae04e44a9f8d8cd90 (patch) | |
tree | c481d2eff3512da0c9c72bb33203d4f9f3b3e636 /api/urls.py | |
parent | a9e36d0ba393bc709c8bd61b133170e9506aa510 (diff) | |
download | online_test-0e3353d489fd54a2c84c712ae04e44a9f8d8cd90.tar.gz online_test-0e3353d489fd54a2c84c712ae04e44a9f8d8cd90.tar.bz2 online_test-0e3353d489fd54a2c84c712ae04e44a9f8d8cd90.zip |
Provide API version 1 for Yaksh
- Serializers for Question, Quiz, QuestionPaper, AnswerPaper
- Can create questions, quizzes, question and answer papers
- Can check mcq, mcc and code questions
- Tests for the API
Diffstat (limited to 'api/urls.py')
-rw-r--r-- | api/urls.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/api/urls.py b/api/urls.py new file mode 100644 index 0000000..be276da --- /dev/null +++ b/api/urls.py @@ -0,0 +1,23 @@ +from django.conf.urls import url +from rest_framework.urlpatterns import format_suffix_patterns +from api import views + + +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'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'), +] + +urlpatterns = format_suffix_patterns(urlpatterns) |