Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion __unicode__() addition not working in basic poll application.
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Colin Keenan  
View profile  
 More options Nov 13 2012, 3:00 pm
From: Colin Keenan <colinnkee...@gmail.com>
Date: Tue, 13 Nov 2012 12:00:57 -0800 (PST)
Local: Tues, Nov 13 2012 3:00 pm
Subject: Re: __unicode__() addition not working in basic poll application.

Thanks for the advice. It's true that I'm just learning django, and because
I wanted to use python3, I installed via the most up-to-date development
source code.  My experience with development versions of stuff has actually
been better than the fully supported versions of the same product for some
reason. So, I'll be continuing on this path. It's strange that people were
experiencing this error over a year ago and didn't mention if they were
using python3. Anyone searching on this error in the future will be glad to
see the correct answer here if they are using python3.

On Monday, May 16, 2011 7:32:41 AM UTC-5, maaz muqri wrote:

> Hi,
> ____________________________________
> class Poll(models.Model):
>     # ...
>     def __unicode__(self):
>         return self.question

> class Choice(models.Model):
>     # ...
>     def __unicode__(self):
>         return self.choice
> ____________________________________

> after adding the above code also I am not able to retrieve the
> question by the command:

> I am getting this

> >>>Poll.objects.all()
> [<Poll: Poll object>]

> instead of this

> >>>Poll.objects.all()
> [<Poll: What's up?>]


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.