Re: How to get vote total in poll tutorial

2006-03-31 Thread JHeasly
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

Re: How to get vote total in poll tutorial

2006-03-30 Thread Adam
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

Re: How to get vote total in poll tutorial

2006-03-29 Thread JHeasly
> > 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

Re: How to get vote total in poll tutorial

2006-03-18 Thread Glenn Tenney
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

Re: How to get vote total in poll tutorial

2006-03-17 Thread [EMAIL PROTECTED]
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

Re: How to get vote total in poll tutorial

2006-03-17 Thread Russell Keith-Magee
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 %-) --~

How to get vote total in poll tutorial

2006-03-17 Thread John Heasly
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