Re: Trouble with "event_set" syntax

2011-05-26 Thread Daniel Roseman
Almost - the `get_latest_by` attribute goes in the inner Meta class. class Event(models.Model): ... class Meta: get_latest_by = 'date' Also note you have to quote the name of the field. -- DR. On 25 May 2011 16:41, Gchorn wrote: >

Re: Trouble with "event_set" syntax

2011-05-24 Thread Daniel Roseman
On Tuesday, May 24, 2011 1:51:30 PM UTC+1, Gchorn wrote: > > Hi All, > > I'm trying to create a website that aggregates information about the > various products made by different companies. To that end, I have > models (classes) for companies, products, and events. Since each > company has

Trouble with "event_set" syntax

2011-05-24 Thread Gchorn
Hi All, I'm trying to create a website that aggregates information about the various products made by different companies. To that end, I have models (classes) for companies, products, and events. Since each company has various products, each product is related to one or more companies by a