summaryrefslogtreecommitdiff
path: root/yaksh/views.py
diff options
context:
space:
mode:
authorankitjavalkar2016-03-31 15:59:06 +0530
committerankitjavalkar2016-05-05 19:08:22 +0530
commit0b5a48f0ba4c4510c0026101ab84e19099691635 (patch)
tree3fa672ff0b91c09c605dca736e26853ea330bde1 /yaksh/views.py
parente8e6b4bc35c7d012d9c41fb37d91687eb605b56c (diff)
downloadonline_test-0b5a48f0ba4c4510c0026101ab84e19099691635.tar.gz
online_test-0b5a48f0ba4c4510c0026101ab84e19099691635.tar.bz2
online_test-0b5a48f0ba4c4510c0026101ab84e19099691635.zip
- Fix django model test cases for Questions and TestCases
- Remove unrequired fields from Question in its models, views and forms
Diffstat (limited to 'yaksh/views.py')
-rw-r--r--yaksh/views.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/yaksh/views.py b/yaksh/views.py
index a8fb66a..2faf127 100644
--- a/yaksh/views.py
+++ b/yaksh/views.py
@@ -217,6 +217,26 @@ def add_question(request, question_id=None):
# 'formset': test_case_formset},
context_instance=ci)
+# @login_required
+# def add_testcase(request, question_id=None):
+# """To add new test case for a question"""
+
+# ci = RequestContext(request)
+# if not question_id:
+# raise Http404('No Question Found')
+# question = Question.objects.get(id=question_id)
+# initial = {'question': question}
+
+# # if question.test
+
+# if request.method == "POST":
+# pass
+# else:
+# form = TestCaseForm(user=user)
+# return my_render_to_response('yaksh/add_testcase.html',
+# {'form': form},
+# context_instance=ci)
+
@login_required
def add_quiz(request, quiz_id=None):