"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:"
class Poll(models.Model):
# ...
def __unicode__(self):
return self.question
Sincerely,
Michael Schade
Spearhead Development LLC
On Fri, Jun 25, 2010 at 5:54 PM, Gabriel Gayan <gabrielgayan@gmail.com> wrote:
Have you tried re-running the server after saving the changes?the tutorial worked perfectly for me.--On Fri, Jun 25, 2010 at 1:16 PM, zippzom <zippzom@gmail.com> wrote:
So, i'm working through the tutorial, but i'm having a problem with
the unicode method in the part 1 writing your own apps. I've copied
the code to the letter, but it still only returns <Poll:Poll object>
instead <Poll: Whats Up?>. Any ideas why this could be happening?
Sorry if this is the wrong place to post this.
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Gabriel Gayan
--
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+unsubscribe@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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment