--- a/quiz/models.py Wed May 05 09:57:33 2010 +0530
+++ b/quiz/models.py Tue Jun 29 11:21:52 2010 +0530
@@ -3,6 +3,24 @@
from offline.event.models import Event
+TOPIC_CHOICES = (("11", "Plotting"),
+ ("12", "Lists and Files"),
+ ("13", "Strings"),
+ ("14", "Dictionaries and Piecharts"),
+ ("15", "Statistics"),
+ ("16", "Matrices"),
+ ("17", "Solving linear equations"),
+ ("18", "Finding roots"),
+
+ ("21", "Basic Datatypes"),
+ ("22", "Input and Output"),
+ ("23", "Lists and Tuples"),
+ ("24", "Dictionaries"),
+ ("25", "Sets"),
+ ("26", "Conditional Statements"),
+ ("27", "Functions"),
+ )
+
class Profile(models.Model):
""" A profile for quiz takers.
"""
@@ -15,7 +33,8 @@
""" A model for holding the database of questions.
"""
- quiz_num = models.CharField(max_length=2)
+ quiz_num = models.CharField(max_length=2, default="00")
+ topic = models.CharField(max_length=2,choices=TOPIC_CHOICES)
description = models.TextField()
code = models.TextField()