mirror of
https://github.com/django/django.git
synced 2025-11-29 15:01:18 +00:00
Fixed #23867 -- removed DateQuerySet hacks
The .dates() queries were implemented by using custom Query, QuerySet, and Compiler classes. Instead implement them by using expressions and database converters APIs.
This commit is contained in:
parent
cc870b8ef5
commit
cbb5cdd155
10 changed files with 111 additions and 253 deletions
|
|
@ -992,7 +992,8 @@ class Query(object):
|
|||
"""
|
||||
Adds a single annotation expression to the Query
|
||||
"""
|
||||
annotation = annotation.resolve_expression(self, summarize=is_summary)
|
||||
annotation = annotation.resolve_expression(self, allow_joins=True, reuse=None,
|
||||
summarize=is_summary)
|
||||
self.append_annotation_mask([alias])
|
||||
self.annotations[alias] = annotation
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue