modified the questionbank model and changed in seed_db accordingly
authornishanth
Tue, 20 Apr 2010 23:12:15 +0530
changeset 22 fe197c0c9903
parent 21 ff6d34fc7137
child 23 f57c30096b51
modified the questionbank model and changed in seed_db accordingly
quiz/management/commands/seed_db.py
quiz/models.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()
--- 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()