Re: query concerning three tables

2011-08-25 Thread Tom Evans
On Thu, Aug 25, 2011 at 8:04 AM, john wrote: > > > ** tobjs = > Trademark.objects.filter(created_by__id__exact=76).filter(publication__entry__pub_date__range=('start_date','end_date')) > Is this literal? Are you actually passing proper dates to filter, or the strings 'start_date' and 'end_date'?

Re: query concerning three tables

2011-08-25 Thread john
this gives me 0 as tobjs.count() which shouldn be the case On Aug 25, 12:04 pm, john wrote: > On Aug 24, 6:29 pm, Tom Evans wrote: > > > > > On Wed, Aug 24, 2011 at 2:12 PM, john wrote: > > > i had three tables, > > > trademarks, publication, and entry > > > trademarks has a foreign key to publ

Re: query concerning three tables

2011-08-25 Thread john
On Aug 24, 6:29 pm, Tom Evans wrote: > On Wed, Aug 24, 2011 at 2:12 PM, john wrote: > > i had three tables, > > trademarks, publication, and entry > > trademarks has a foreign key to publication, and publication has a > > foreign key to entry, and entry has a field called published_date, > > wh

Re: query concerning three tables

2011-08-24 Thread Tom Evans
On Wed, Aug 24, 2011 at 2:12 PM, john wrote: > i had three tables, > trademarks, publication, and entry > trademarks has a foreign key to publication, and publication has a > foreign key to entry, and entry has a field called published_date, > which i am intrested in.. > how should i go about such