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 query.py ticket-2210.diff

(It baulked on the forms to do with "/newforms/"... I don't know what  
they are but I don't have them installed...

... when I do a ...

competitors = m.Competitor.objects.filter(client=client).order_by 
("sites_site.pagerank")

...I still get ...

OperationalError: (1054, "Unknown column 'sites_site.pagerank' in  
'order clause'")

The syntax in the order_by looked a little non-standard, which for  
DjangoSQL is saying something, so I tried a number of alternatives...  
and this one worked!!!

competitors = m.Competitor.objects.filter(client=client).order_by 
("site__pagerank")

..or

competitors = m.Competitor.objects.filter(client=client).order_by("- 
site__pagerank")
--~--~---------~--~----~------------~-------~--~----~
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