On 3/18/06, Ned Batchelder <[EMAIL PROTECTED]> wrote:
>
> Or something like that, I'm backtranslating from my real app.  Is there
> a cleaner way?

  I think you can do this... Not very clean, but I just had lunch and
I am feeling sleepy.

poll_list = []
choice_list = choices.get_list(choice__exact = "overeasy",
select_related = True)
for choice in choice_list:
    poll_list.append(choice.get_poll())

The select_related = True argument will JOIN polls and choices
avoiding a new database hit on every .get_poll()


--
Julio Nobrega - http://www.inerciasensorial.com.br

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