quiz/models.py
changeset 86 404e9c1b8cff
parent 82 79ae8288b5ff
child 87 e81b105b1128
--- a/quiz/models.py	Thu Jul 01 16:55:22 2010 +0530
+++ b/quiz/models.py	Thu Jul 01 17:05:57 2010 +0530
@@ -43,6 +43,18 @@
     time_limit = models.PositiveSmallIntegerField()
     expected_ans = models.TextField()
 
+    def get_values(self):
+
+        values_dict = {"quiz_num" : self.quiz_num,
+                       "topic" : self.topic,
+                       "description" : self.description,
+                       "code" : self.code,
+                       "options" : self.options,
+                       "time_limit" : self.time_limit,
+                       "expected_ans" : self.expected_ans,
+                      }
+        return values_dict
+
     def __unicode__(self):
 
         return self.description