From 1662f80d18ea00ad96bab28762352d8f6068f732 Mon Sep 17 00:00:00 2001 From: prathamesh Date: Mon, 19 Dec 2016 08:43:17 +0530 Subject: cleaned up the code and made testcase forms dynamic --- yaksh/templates/yaksh/add_question.html | 36 +++-------------- yaksh/views.py | 69 ++++++++------------------------- 2 files changed, 21 insertions(+), 84 deletions(-) (limited to 'yaksh') diff --git a/yaksh/templates/yaksh/add_question.html b/yaksh/templates/yaksh/add_question.html index 91c7de4..57e5e78 100644 --- a/yaksh/templates/yaksh/add_question.html +++ b/yaksh/templates/yaksh/add_question.html @@ -38,44 +38,18 @@ {{ file.file.name }} {% endfor %}{% endif %} + {% for formset in formsets %}
- {{ standardformset.management_form }} + {{ formset.management_form }} - {% for stdform in standardformset %} + {% for form in formset %} {% endfor %}
-
-
- {{ stdioformset.management_form }} - {% for ioform in stdioformset %} - - {% endfor %} - -
-
- {{ mcqformset.management_form }} - - {% for mcqform in mcqformset %} - - {% endfor %} -
-
- {{ hookformset.management_form }} - - {% for hookform in hookformset %} - - {% endfor %} -
+ {% endfor %}