For this code:

class Title(models.Model):
        title = models.CharField(max_length=200)
        pub_date = models.DateTimeField('date published')

        def __unicode__(self):
                return self.title

        def was_published_today(self):
                return self.pub_date.date() == datetime.date.today()

class Question(models.Model):
        title = models.ForeignKey(Title)
        question = models.CharField(max_length=200)
        choice1 = models.CharField(max_length=200)
        choice2 = models.CharField(max_length=200)
        choice3 = models.CharField(max_length=200)
        choice4 = models.CharField(max_length=200)
        choice5 = models.CharField(max_length=200)

        def __unicode__(self):
                return self.question

I'm trying to write a view where it outputs like this

Question

Choice 1-choice 5 in a radio button

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to