On Fri, Apr 22, 2011 at 4:22 PM, John Maines <jmai...@sun-sentinel.com> wrote: > Hello, > > I am going through the Django Tutorials on the Django home page. All > has gone fine, except one thing: > > When building the admin page, I can't get the unicode translator to > work. It is supposed to change "Poll: Poll object" to readable text. > It just doesn't work. I am using PostgreSQL set for UTF8 encoding. > Running on Windows. > > Any ideas? Thank you.
The problem you are trying to solve is not clear to me. Reformulate your question, please. > Here are the instructions that fail: > > "Wait a minute. <Poll: Poll object> is, utterly, an unhelpful > representation of this object. Let's fix that by editing the polls > model (in the polls/models.py file) and adding a __unicode__() method > to both Poll and Choice:" Check out what the __unicode__() method is all about: http://docs.djangoproject.com/en/dev/ref/models/instances/?from=olddocs#unicode For general information of Unicode support in Django you may find here: http://docs.djangoproject.com/en/dev/ref/unicode/ > > class Poll(models.Model): > # ... > def __unicode__(self): > return self.question > > class Choice(models.Model): > # ... > def __unicode__(self): > return self.choice > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-users@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. > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@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.