Sorry - should also have mentioned that this should be on django-users. On 31 Oct 2008, at 14:28, Opel wrote:
> > I have been following along to the Django Tutorial after downloading > and installing V1.0. Everything is working fine apart from when I try > to use the python shell to return the objects names. I tried to skip > the step but when I tried to create the select menu of Polls for the > Choices all that was returned was "Poll Object" instead of the name. > > This is what my model looks like at the moment > > class Poll(models.Model): > question = models.CharField(max_length=200) > pub_date = models.DateTimeField('date published') > > def __unicode__(self): > return self.question > > > class Choice(models.Model): > poll = models.ForeignKey(Poll) > choice = models.CharField(max_length=200) > votes = models.IntegerField() > > def __unicode__(self): > return self.choice > > When I do >>>> from mysite.polls.models import Poll, Choice >>>> Poll.object.all() > > I get "poll.object" instead of a name. Could anyone point out where I > am going wrong please? > > Thanks > > > -- Dan Fairs <[EMAIL PROTECTED]> | http://www.fezconsulting.com/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---