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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.