On Oct 2, 7:35 pm, mrts <mrts.py...@gmail.com> wrote: > But let me stop right here.
Contradicting myself, I've pursued this further and implemented raw_override() for order_by in [1] as a proof of concept. See [2] for what's different and tests [3] for usage. I'd say that for order_by, the implementation is simple and straightforward and not that much more fragile than extra() (see tests for the second model in [3] for a complex-ish example). As for the usefulness, complex ordering can probably be solved with existing extra() by SELECTing the complex order criteria, aliasing them and using that alias in order_by. But perhaps someone likes or needs the idea and wants to take it further for other parts of the query. Once again, over and out on this matter, Mart Sõmermaa [1] branch: http://github.com/mrts/django/tree/raw_sql_override [2] diff: http://github.com/mrts/django/commit/dd127debfed070bb8152f10cb5770b216baee3de [3] tests: http://github.com/mrts/django/blob/raw_sql_override/tests/modeltests/raw_override/models.py --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---