summaryrefslogtreecommitdiff
path: root/testapp/exam
diff options
context:
space:
mode:
authorPrabhu Ramachandran2014-05-18 00:20:14 +0530
committerPrabhu Ramachandran2014-05-18 00:20:14 +0530
commit3d0b69caf6b94a1afe95fef2787929c14afdb485 (patch)
tree0d58ceacdd7d5f6c6ea1fb2eabc889c552bebdd0 /testapp/exam
parent70b73660f9c10174e318d570a820ca0cc01f8d5f (diff)
parent4f33c2f53144e6aa101f43947c07cdc7634325a8 (diff)
downloadonline_test-3d0b69caf6b94a1afe95fef2787929c14afdb485.tar.gz
online_test-3d0b69caf6b94a1afe95fef2787929c14afdb485.tar.bz2
online_test-3d0b69caf6b94a1afe95fef2787929c14afdb485.zip
Merge pull request #15 from prathamesh920/load_exam_command
load_exam command modified to accept tags.
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()