tags:

views:

1043

answers:

3

Hi, guys, how or where is the "join" query in Django?

i think that Django dont have "join"..but how ill make join?

Thanks

A: 

Look into model relationships and accessing related objects.

bryan
i did it, thanks, but the true is that im reading and reading and think that django doc's need more examples.
Asinox
A: 

SQL Join queries are a hack because SQL doesn't have objects or navigation among objects.

Objects don't need "joins". Just access the related objects.

S.Lott
+2  A: 

If you're using models, the select_related method will return the object for any foreign keys you have set up (up to a limit you specify) within that model.

Josh Smeaton