From 4f33c2f53144e6aa101f43947c07cdc7634325a8 Mon Sep 17 00:00:00 2001 From: prathamesh Date: Thu, 8 May 2014 12:54:12 +0530 Subject: load_exam command modified to accept tags. sample_questions template modified. Tags can be added to the template. --- testapp/exam/management/commands/load_exam.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'testapp/exam/management/commands/load_exam.py') 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() -- cgit