#23867 closed Cleanup/optimization (fixed)
Remove hacks required by .dates() queries
Reported by: | Anssi Kääriäinen | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The dates() queries implementation uses custom QuerySet, Query and Compiler classes. Before expressions and database value converters were added there were no other way to convert the database values than addition of these subclasses to hack around the limitations in Django. But now with expressions and converters support it is possible to implement the dates queries by using public APIs only.
This is implemented in https://github.com/django/django/pull/3570.
As I don't think anybody wants to keep the old way around, and also I think the patch is ready for merge, so I'll mark this directly as ready for checkin.
In cbb5cdd155668ba771cad6b975676d3b20fed37b: