summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrabhu Ramachandran2011-11-19 00:08:46 +0530
committerPrabhu Ramachandran2011-11-19 00:08:46 +0530
commitf2c80147ff9e62d098b37355d211fe9cc04f60ca (patch)
tree432ad3e43fd56a8b445c986f02f953f4211b50d6
parent802a4d94dc261911e421124b102e6e42bef9e04b (diff)
downloadonline_test-f2c80147ff9e62d098b37355d211fe9cc04f60ca.tar.gz
online_test-f2c80147ff9e62d098b37355d211fe9cc04f60ca.tar.bz2
online_test-f2c80147ff9e62d098b37355d211fe9cc04f60ca.zip
Moving load_questions to load_questions_xml
Changing the command ./manage.py load_questions to load_questions_xml.
-rw-r--r--exam/management/commands/load_questions_xml.py (renamed from exam/management/commands/load_questions.py)4
1 files changed, 2 insertions, 2 deletions
diff --git a/exam/management/commands/load_questions.py b/exam/management/commands/load_questions_xml.py
index 336ed92..1e9cfde 100644
--- a/exam/management/commands/load_questions.py
+++ b/exam/management/commands/load_questions_xml.py
@@ -22,7 +22,7 @@ def clear_questions():
for question in Question.objects.all():
question.delete()
-def load_questions(filename):
+def load_questions_xml(filename):
"""Load questions from the given XML file."""
q_bank = parse(filename).getElementsByTagName("question")
@@ -59,6 +59,6 @@ class Command(BaseCommand):
# Load from files.
for fname in args:
self.stdout.write('Importing from {0} ... '.format(basename(fname)))
- load_questions(fname)
+ load_questions_xml(fname)
self.stdout.write('Done\n')