Friday, November 5, 2010

Adding "Using foo" to the end of an order by

I need to sort results alphanumerically. Thanks to some code floating
around #postgres (http://www.rhodiumtoad.org.uk/junk/naturalsort.sql)
I now have some handy operators to do just that. The raw sql I'd issue
to ensure that the results are sorted correctly would be something
like "select * from foo order by bar USING <#"

Manager.order_by, and extra's order_by kwarg limit their arguments to
vaild fields - is there some way I can add that part on using django's
ORM? Or do I need to issue these queries in the raw?

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate