# HG changeset patch # User nishanth # Date 1271785335 -19800 # Node ID fe197c0c9903795648f486ac1092810b6b74c69c # Parent ff6d34fc7137815817f4888eb77a8ebedfd65a5e modified the questionbank model and changed in seed_db accordingly diff -r ff6d34fc7137 -r fe197c0c9903 quiz/management/commands/seed_db.py --- a/quiz/management/commands/seed_db.py Tue Apr 20 22:05:32 2010 +0530 +++ b/quiz/management/commands/seed_db.py Tue Apr 20 23:12:15 2010 +0530 @@ -17,7 +17,6 @@ q1 = QuestionBank() q1.quiz_num = "11" q1.description = "How do you combine two lists a and b" - q1.type = 'S' q1.time_limit = 15 q1.expected_ans = r"a + b" q1.save() @@ -25,7 +24,6 @@ q2 = QuestionBank() q2.quiz_num = '11' q2.description = "What IPython magic command would you use to obtain the code that you have already typed." - q2.type = "S" q2.time_limit = 15 q2.expected_ans = r"%hist" q2.save() @@ -33,7 +31,6 @@ q3 = QuestionBank() q3.quiz_num = "11" q3.description = "a = [1, 2, 5, 9]. How do you add 10 to end of this list." - q3.type = "S" q3.time_limit = 30 q3.expected_ans = r"a.append(10)" q3.save() diff -r ff6d34fc7137 -r fe197c0c9903 quiz/models.py --- a/quiz/models.py Tue Apr 20 22:05:32 2010 +0530 +++ b/quiz/models.py Tue Apr 20 23:12:15 2010 +0530 @@ -16,7 +16,8 @@ quiz_num = models.CharField(max_length=2) description = models.TextField() - type = models.CharField(max_length=1) + code = models.TextField() + options = models.TextField() time_limit = models.PositiveSmallIntegerField() expected_ans = models.TextField()