django1/django/db/models
Luke Plant 40b8a6174f Fixed #33397 -- Corrected resolving output_field for DateField/DateTimeField/TimeField/DurationFields.
This includes refactoring of CombinedExpression._resolve_output_field()
so it no longer uses the behavior inherited from Expression of guessing
same output type if argument types match, and instead we explicitly
define the output type of all supported operations.

This also makes nonsensical operations involving dates
(e.g. date + date) raise a FieldError, and adds support for
automatically inferring output_field for cases such as:
* date - date
* date + duration
* date - duration
* time + duration
* time - time
2022-03-31 11:05:23 +02:00
..
fields Refs #32365 -- Removed internal uses of utils.timezone.utc alias. 2022-03-24 06:29:50 +01:00
functions Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
sql Removed unnecessary Query.get_loaded_field_names_cb() and Query.deferred_to_data()'s callback argument. 2022-03-31 10:54:59 +02:00
__init__.py Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
aggregates.py Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
base.py Used sets for field names for exclusion. 2022-03-16 11:05:09 +01:00
constants.py Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
constraints.py Made BaseConstraint importable from django.db.models. 2022-03-16 16:21:10 +01:00
deletion.py Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
enums.py Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
expressions.py Fixed #33397 -- Corrected resolving output_field for DateField/DateTimeField/TimeField/DurationFields. 2022-03-31 11:05:23 +02:00
indexes.py Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
lookups.py Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
manager.py Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
options.py Refs #33476 -- Refactored code to strictly match 88 characters line length. 2022-02-07 20:37:05 +01:00
query.py Fixed #29865 -- Added logical XOR support for Q() and querysets. 2022-03-04 12:55:37 +01:00
query_utils.py Updated select_related_descend() comment. 2022-03-31 08:50:25 +02:00
signals.py Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
utils.py Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00