Ned Batchelder wrote:

>   polls.get_list(choice__choice__exact="overeasy")   # Doesn't work.
>
>Am I wrong?  Please tell me there is a way to accomplish what I want.  
>This is all in .91.
>
AFAIK this is one of the thing that magic-removal is solving. There you 
would have Poll.choice_set which is a query you want.

In 0.91 if it only needed in a couple of models you can declare such 
functions manually:

    class Poll(meta.Model):
      ...
   
      def _module_get_for_choice(choice):
        polls.get_list(where=["id in (SELECT poll_id FROM app_choices 
where choice='%s')"%choice])

This _module_get_for_choice will magically become a method of module polls:

    polls.get_for_choice('overeasy')

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to