> class Choice(models.Model):
>    poll = models.ForeignKey(Poll)
>    choice = models.CharField(max_length=200)
>    votes = models.IntegerField()
>    def __unicode__(self):
>        return self.question
>
>
> I know the structure is wrong.
> Any suggestions would be greatly appreciated.

Hi,

  I'm not sure why you'd think the structure is wrong (i.e. state
actual errors or problems rather than generic statements).

  However there is one problem with your Choice model. It does not
have any self.question, so __unicode__() can't really return it. You
probaby want to use "return self.choice" there (or compose some text
string based on existing model fields).

  HTH

    Jirka

-- 
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