summaryrefslogtreecommitdiff
path: root/testapp/exam
diff options
context:
space:
mode:
authorprathamesh2014-05-08 12:54:12 +0530
committerprathamesh2014-05-08 12:54:12 +0530
commit4f33c2f53144e6aa101f43947c07cdc7634325a8 (patch)
tree0d58ceacdd7d5f6c6ea1fb2eabc889c552bebdd0 /testapp/exam
parent70b73660f9c10174e318d570a820ca0cc01f8d5f (diff)
downloadonline_test-4f33c2f53144e6aa101f43947c07cdc7634325a8.tar.gz
online_test-4f33c2f53144e6aa101f43947c07cdc7634325a8.tar.bz2
online_test-4f33c2f53144e6aa101f43947c07cdc7634325a8.zip
load_exam command modified to accept tags.
sample_questions template modified. Tags can be added to the template.
Diffstat (limited to 'testapp/exam')
-rw-r--r--testapp/exam/management/commands/load_exam.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/testapp/exam/management/commands/load_exam.py b/testapp/exam/management/commands/load_exam.py
index 3f247a1..e3f72da 100644
--- a/testapp/exam/management/commands/load_exam.py
+++ b/testapp/exam/management/commands/load_exam.py
@@ -32,7 +32,9 @@ def load_exam(filename):
raise NameError(msg)
for question in questions:
- question.save()
+ question[0].save()
+ for tag in question[1]:
+ question[0].tags.add(tag)
if 'quiz' in locals():
quiz.save()