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:
> Thank you Daniel! This is rea
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 va
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 Many
3 matches
Mail list logo