On 4 Feb 2007, at 17:51, Don Arbow wrote:

> class Meta:
>      ordering = ('pagerank',)

Except that I'd have quite like to sort by other attributes as  
well... default ordering is ok but it'd be nice to be able to swap  
ordering on the fly wouldn't it...

I kinda half expected this to work...


class Competitor(models.Model):
     client = models.ForeignKey(Client)
     site = models.ForeignKey(Site)

     def pagerank(self):
         return self.site.pagerank

     class Meta:
         ordering = ('pagerank',)

In an ideal world this would work.. but I get a "order by column not  
found...



--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to