From 0b5a48f0ba4c4510c0026101ab84e19099691635 Mon Sep 17 00:00:00 2001 From: ankitjavalkar Date: Thu, 31 Mar 2016 15:59:06 +0530 Subject: - Fix django model test cases for Questions and TestCases - Remove unrequired fields from Question in its models, views and forms --- yaksh/views.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'yaksh/views.py') 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): -- cgit