Re: Releated data from models

2007-08-31 Thread sect2k
I guess was what i was looing for, i wrote a subquery for getting a user's vote and now it works. Thanks. Cheers, Mitja James Bennett wrote: > > > On 8/31/07, sect2k <[EMAIL PROTECTED]> wrote: >> One way of doing it would be to use template tags, but that would amount >> to >> redundant SQL

Re: Releated data from models

2007-08-31 Thread sect2k
Wow, that was fast :) I was just looking at that, but i'm not sure it's what i'm looking for, but then again, i'm both new at django and python, so sometimes i'm a bit lost. the result i would like to get is someting similar to what this query would return: select ss.*, sv.vote from stories_s

Re: Releated data from models

2007-08-31 Thread James Bennett
On 8/31/07, sect2k <[EMAIL PROTECTED]> wrote: > One way of doing it would be to use template tags, but that would amount to > redundant SQL queries for each story. I guess another way of doing it would > be to write custom SQL using JOIN. > > What I would like to know is what is the django way of