Re: Related "order by" problems (Solved-ish)

2007-02-05 Thread Tom Smith
On 4 Feb 2007, at 16:44, Ramiro Morales wrote: > See tickets #2210 and 2076 where a patch is proposed to solve the > problem. I tried to patch it.. like this... >>cd /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/ site-packages/Django-0.95-py2.4.egg/django/db/models >>patch

Re: Related "order by" problems

2007-02-04 Thread Tom Smith
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...

Re: Related "order by" problems

2007-02-04 Thread Don Arbow
On Feb 4, 2007, at 8:44 AM, Ramiro Morales wrote: > > On 2/4/07, Tom Smith <[EMAIL PROTECTED]> wrote: >> >> I have a model that looks roughly like this... >> >> class Client(models.Model): >> name = models.CharField(maxlength=200, default='') >> >> class Competitor(models.Model): >> clie

Re: Related "order by" problems

2007-02-04 Thread Ramiro Morales
On 2/4/07, Tom Smith <[EMAIL PROTECTED]> wrote: > > I have a model that looks roughly like this... > > class Client(models.Model): > name = models.CharField(maxlength=200, default='') > > class Competitor(models.Model): > client = models.ForeignKey(Client) > site = models.ForeignKey

Related "order by" problems

2007-02-04 Thread Tom Smith
I have a model that looks roughly like this... class Client(models.Model): name = models.CharField(maxlength=200, default='') class Competitor(models.Model): client = models.ForeignKey(Client) site = models.ForeignKey(Site) class Site(models.Model): client = models.ForeignKe