Re: simple of flatpages with custom ordering

2009-06-04 Thread josebrwn
thank you! --~--~-~--~~~---~--~~ 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

Re: simple of flatpages with custom ordering

2009-06-04 Thread Alex Gaynor
On Thu, Jun 4, 2009 at 12:52 PM, josebrwn wrote: > > Hi, > > I would like to have a list of recent flatpages. I'm doing something > like: > > class LatestCmsNode(template.Node): >def render(self, context): >context['latest_cms'] = FlatPage.objects.all()[:2] >

simple of flatpages with custom ordering

2009-06-04 Thread josebrwn
Hi, I would like to have a list of recent flatpages. I'm doing something like: class LatestCmsNode(template.Node): def render(self, context): context['latest_cms'] = FlatPage.objects.all()[:2] return '' but this orders the results by url (title), and wh