from django.db import models


class QuestionGroup(models.Model):
    heading = models.TextField()
    text = models.TextField(blank=True)
    date_added = models.DateTimeField(auto_now=True)
    date_modified = models.DateTimeField(auto_now_add=True)


class Question(models.Model):
    text = models.TextField()
    question_group = models.ForeignKey(QuestionGroup)
    date_added = models.DateTimeField(auto_now=True)
    date_modified = models.DateTimeField(auto_now_add=True)


class Choice(models.Model):
    text = models.TextField()
    question = models.ForeignKey(Question)
    date_added = models.DateTimeField(auto_now=True)
    date_modified = models.DateTimeField(auto_now_add=True)


class Session(models.Model):
    name = models.TextField(blank=True)
    ip = models.CharField(max_length=200)
    date_added = models.DateTimeField(auto_now=True)
    date_submitted = models.DateTimeField(null=True)


class Response(models.Model):
    choice = models.ForeignKey(Choice)
    session = models.ForeignKey(Session)
    value = models.IntegerField()
    date_added = models.DateTimeField(auto_now=True)
    date_modified = models.DateTimeField(auto_now_add=True)

@@ -242,24 +242,98 @@
 _add=True)%0A%0A
+    def __str__(self):%0A        return str(self.id) + %22. %22 + self.heading%0A%0A
 %0Aclass Quest
@@ -545,24 +545,95 @@
 _add=True)%0A%0A
+    def __str__(self):%0A        return str(self.id) + %22. %22 + self.text%0A%0A
 %0Aclass Choic
@@ -767,32 +767,32 @@
 (auto_now=True)%0A
-
     date_modifie
@@ -832,24 +832,95 @@
 _add=True)%0A%0A
+    def __str__(self):%0A        return str(self.id) + %22. %22 + self.text%0A%0A
 %0Aclass Sessi

Implement __str__ for proper printing in admin