#32584: OrderBy.as_sql() overwrites template, creating invalid syntax for certain database backends -------------------------------------+------------------------------------- Reporter: Tim Nyborg | Owner: nobody Type: Uncategorized | Status: closed Component: Database layer | Version: 3.2 (models, ORM) | Severity: Normal | Resolution: wontfix Keywords: order_by, | Triage Stage: nulls_first | Unreviewed Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+-------------------------------------
Comment (by David Beitey): @Mariusz, thanks for the suggestions - much appreciated. I've followed your second suggestion and created https://github.com/microsoft/mssql-django/pull/32. Relying on the implementation details of `OrderBy.as_sql()` not to modify templates feels slightly hacky, but in contrast, re-implementing the whole `as_mssql()` would have involved copy-pasting most of the function out of Django's core (e.g in order to remove the template modification code) -- and keeping that in lock-step with Django would be a greater challenge. -- Ticket URL: <https://code.djangoproject.com/ticket/32584#comment:8> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/067.a79077275a04632733c1fbb0149b81f6%40djangoproject.com.