equal
deleted
inserted
replaced
1 from xml.dom.minidom import parse, Node |
1 from xml.dom.minidom import parse, Node |
2 |
2 |
3 from django.core.management.base import NoArgsCommand |
3 from django.core.management.base import NoArgsCommand |
4 |
4 |
5 from offline.quiz.models import QuestionBank |
5 from offline.quiz.models import QuestionBank, Quiz |
6 |
6 |
7 name2num = {"day1quiz1" : "11", |
7 name2num = {"day1quiz1" : "11", |
8 "day1quiz2" : "12", |
8 "day1quiz2" : "12", |
9 "day2quiz1" : "21", |
9 "day2quiz1" : "21", |
10 } |
10 } |
40 options = options, |
40 options = options, |
41 code = code, |
41 code = code, |
42 expected_ans = expected_ans, |
42 expected_ans = expected_ans, |
43 ) |
43 ) |
44 new_question.save() |
44 new_question.save() |
45 |
|
46 |
|
47 |
45 |
48 class Command(NoArgsCommand): |
46 class Command(NoArgsCommand): |
49 |
47 |
50 def handle_noargs(self, **options): |
48 def handle_noargs(self, **options): |
51 """ Just copied the code from seed_db.py """ |
49 """ Just copied the code from seed_db.py """ |