On Thu, 2009-07-30 at 21:23 -0700, Asinox wrote: > Hi, guys, how or where is the "join" query in Django? > > i think that Django dont have "join"..but how ill make join?
SQL-level joins happen automatically when required. You specify your queryset in terms of filter() and exclude() calls and Django works out which tables are needed to compute that result. Links between models are specified using the double-underscore notation. Thus, "foo__bar" means to use the "foo" field on the current model (a link to a related model) and follow that to the "bar" field on the other end of the relation. Regards, Malcolm --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---