> > 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
Figured it out; poll_id maps from polls_choices to the polls_polls primary key, so I tried using the Django primary-key shortcut (see below) and now it works. choices.get_values(fields=['poll', 'votes'], poll_id__exact=1) as suggested above, doesn't work: (TypeError: got unexpected keyword argument 'poll_id__exact'), but ... choices.get_values(fields=['poll', 'votes'], poll__pk=1) ... does! Not sure why though. Just as an "exercise left to the reader" sort of thing, I was trying to figure out how to make the lookup work without the pk shortcut, i.e.: choices.get_values(fields=['poll', 'votes'], poll__poll_id__exact=1) but it fails: TypeError: got unexpected keyword argument 'polls__poll_id__exact' I'm stumped! John --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---