Re: Most efficient way to handle two level deep relationships

2007-04-06 Thread Mike H
Hi Ben, Thank you, I had overlooked that! It works exactly as I wanted it to! Mike On 4/6/2007, "Benjamin Slavin" <[EMAIL PROTECTED]> wrote: > >Hi Mike, > >You'll probably want to check-out select_related. [0] > >With that feature, you could use: >posts = Post.objects.select_related().filter(

Re: Most efficient way to handle two level deep relationships

2007-04-06 Thread Benjamin Slavin
Hi Mike, You'll probably want to check-out select_related. [0] With that feature, you could use: posts = Post.objects.select_related().filter(thread__slug=thread_slug) If the copy of Django you're using is recent enough (I don't know if it's in 0.96), you can use the 'depth' argument... posts =