]> git.parisson.com Git - django_quiz.git/commitdiff
changed quiz/models fields to CommaSeparatedIntegerField when appropriate
authorTom Walker <tomwalker0472@gmail.com>
Sun, 29 Jun 2014 17:54:20 +0000 (18:54 +0100)
committerTom Walker <tomwalker0472@gmail.com>
Sun, 29 Jun 2014 17:54:20 +0000 (18:54 +0100)
quiz/models.py

index 232ab3ede54ade68885112bfb86ed690b1e6ac8c..8d83359788877b9905b738275c3446def8501d30 100644 (file)
@@ -143,8 +143,9 @@ class Progress(models.Model):
 
     user = models.OneToOneField('auth.User')  #  one user per progress class
 
-    score = models.TextField()  #  The god awful csv.
-                                #  Always end this with a comma,
+    #  The god awful csv. Always end with a comma
+    score = models.CommaSeparatedIntegerField(max_length = 1024)
+
 
     objects = ProgressManager()
 
@@ -335,9 +336,10 @@ class Sitting(models.Model):
 
     quiz = models.ForeignKey(Quiz)
 
-    question_list = models.TextField()
+    question_list = models.CommaSeparatedIntegerField(max_length = 1024)
 
-    incorrect_questions = models.TextField(blank = True)
+    incorrect_questions = models.CommaSeparatedIntegerField(max_length = 1024,
+                                                            blank = True)
 
     current_score = models.IntegerField()