diff options
author | prathamesh | 2014-05-08 12:54:12 +0530 |
---|---|---|
committer | prathamesh | 2014-05-08 12:54:12 +0530 |
commit | 4f33c2f53144e6aa101f43947c07cdc7634325a8 (patch) | |
tree | 0d58ceacdd7d5f6c6ea1fb2eabc889c552bebdd0 /testapp/exam | |
parent | 70b73660f9c10174e318d570a820ca0cc01f8d5f (diff) | |
download | online_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.py | 4 |
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() |