Ah! You're correct. I get it now. Thanks!
--~--~-~--~~~---~--~~
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
You're dancing all around it. I'm pretty sure its:
poll__id__exact=1 (two underscores both times)
--~--~-~--~~~---~--~~
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
>
> Then you probably want it to read:
> choices.get_values(fields=['poll', 'votes'], poll_id__exact=1)
>
> i.e. your "field" is "poll_id" and the lookuptype is "exact"
> which translates to "poll_id__exact", and THEN the equals sign
> and what value you are asking it to match.
>
> --
> Glenn
On Fri, Mar 17, 2006 at 10:57:14PM -0800, [EMAIL PROTECTED] wrote:
> No, one underscore doesn't work:
> choices.get_values(fields=['poll', 'votes'], poll_id=1)
> returns
> TypeError: got unexpected keyword argument 'poll_id'
>
> I'm using two underscores because that's my (limited) understandin
No, one underscore doesn't work:
choices.get_values(fields=['poll', 'votes'], poll_id=1)
returns
TypeError: got unexpected keyword argument 'poll_id'
I'm using two underscores because that's my (limited) understanding of
the field__lookuptype syntax of the API documentation
(http://www.djangop
On 3/18/06, John Heasly <[EMAIL PROTECTED]> wrote:
> choices.get_values(fields=['poll', 'votes'], order_by=['poll'],
> poll__id=1)
> fails returning a
> TypeError: got unexpected keyword argument 'poll__id'
Looks like you have one too many underscores: poll_id, not poll__id.
Russ Magee %-)
--~
I want to add a vote percentage to the polls tutorial, so I need to
get the vote totals for each poll. But after messing with the API and
the documentation, I'm stumped as to how to craft a choices.get_values
() lookup to get those vote totals. I'm using 0.91 and my polls.py is
straight out
7 matches
Mail list logo