summaryrefslogtreecommitdiff
path: root/django/db/models
AgeCommit message (Collapse)Author
2019-03-27Fixed #28621 -- Fixed crash of annotations with OuterRef.Mariusz Felisiak
2019-03-25Fixed #28431 -- Added a system check for BinaryField to prevent strings ↵Hasan Ramezani
defaults. Thanks Claude Paroz for the initial patch.
2019-03-23Fixed #30246 -- Reused annotation aliases references in aggregation filters.Simon Charette
Thanks Jan Baryła for the detailed report and the reduced test case.
2019-03-23Refs #30188 -- Avoided GROUP BY when aggregating over non-aggregates.Simon Charette
2019-03-23Refs #30188 -- Prevented double annotation of subquery when aggregated over.Simon Charette
Thanks Can Sarıgöl for the suggested trimming approach.
2019-03-23Fixed #30188 -- Fixed a crash when aggregating over a subquery annotation.Simon Charette
2019-03-23Fixed #21703 -- Fixed a crash when excluding a related field with a F().Simon Charette
2019-03-22Fixed #30280 -- Restored Model.get_FIELD_display()'s coercion of lazy strings.Matthias Kestenholz
Reverted cc79c7ee637e65c8da27e56d746c87903d5ec901.
2019-03-22Fixed #30271 -- Added the Sign database function.Nick Pope
2019-03-21Removed obsolete Lookup hook to prepare rhs expressions.Simon Charette
After 3a505c70e7b228bf1212c067a8f38271ca86ce09, all _prepare() methods return self.
2019-03-21Refs #27149, #29542 -- Simplified subquery parentheses wrapping logic.Simon Charette
2019-03-21Refs #27149 -- Moved subquery expression resolving to Query.Simon Charette
This makes Subquery a thin wrapper over Query and makes sure it respects the Expression source expression API by accepting the same number of expressions as it returns. Refs #30188. It also makes OuterRef usable in Query without Subquery wrapping. This should allow Query's internals to more easily perform subquery push downs during split_exclude(). Refs #21703.
2019-03-21Refs #27149 -- Made Subquery store Query instead of Queryset.Simon Charette
Subquery only uses Query.
2019-03-21Fixed #30158 -- Avoided unnecessary subquery group by on aggregation.Simon Charette
Subquery annotations can be omitted from the GROUP BY clause on aggregation as long as they are not explicitly grouped against. Thanks Jonny Fuller for the report.
2019-03-21Refs #30158 -- Added alias argument to Expression.get_group_by_cols().Simon Charette
2019-03-20Fixed #30240 -- Added SHA1, SHA224, SHA256, SHA384, and SHA512 database ↵Nick Pope
functions. Thanks Mariusz Felisiak and Tim Graham for reviews.
2019-03-14Fixed #30254 -- Allowed model metaclasses to access the attribute dict in ↵Matt Westcott
__init__(). Regression in a68ea231012434b522ce45c513d84add516afa60.
2019-03-07Fixed #29754 -- Added is_dst parameter to Trunc database functions.ahbk
2019-03-04Fixed #30232 -- Corrected expected format in invalid DurationField error ↵avas9366
message.
2019-03-01Refs #29408 -- Cosmetic edits for validation of related fields and lookups ↵Mariusz Felisiak
in model Meta.ordering. Follow up to 440505cb2cadbe1a5b9fba246bcde6c04f51d07e.
2019-03-01Fixed #29408 -- Added validation of related fields and lookups in model ↵Hasan Ramezani
Meta.ordering.
2019-02-21Refs #19544 -- Added a fast path for through additions if supported.Simon Charette
The single query insertion path is taken if the backend supports inserts that ignore conflicts and m2m_changed signals don't have to be sent.
2019-02-21Refs #19544 -- Ignored auto-created through additions conflicts if supported.Simon Charette
This prevents IntegrityError caused by race conditions between missing ids retrieval and bulk insertions.
2019-02-21Refs #19544 -- Extracted ManyRelatedManager.add() missing ids logic to a method.Simon Charette
2019-02-21Refs #28643 -- Added MD5 database function.Mariusz Felisiak
Thanks Tim Graham, Nick Pope and Simon Charette for reviews.
2019-02-14Fixed #29619 -- Added field names to some FieldErrors.Hasan Ramezani
2019-02-13Fixed #30184 -- Removed ellipsis characters from shell output strings.Dan Davis
Partially reverted 50b8493581fea3d7137dd8db33bac7008868d23a (refs #29654) to avoid a crash when the user shell doesn't support non-ASCII characters.
2019-02-09Fixed #30027 -- Errored out on Window function usage if unsupported.Simon Charette
2019-02-09Simplified Window.as_sql().Sergey Fedoseev
2019-02-06Fixed #30159 -- Removed unneeded use of OrderedDict.Nick Pope
Dicts preserve order since Python 3.6.
2019-02-04Fixed #30156 -- Dropped support for SpatiaLite 4.1 and 4.2.Tim Graham
2019-01-30Refs #29444 -- Renamed DatabaseFeatures.can_return_id* to be generic for ↵Johannes Hoppe
other columns.
2019-01-30Fixed #30076 -- Added Model.get_FOO_display() even if field's choices are empty.Joshua Cannon
2019-01-30Fixed E117 and F405 flake8 warnings.Mariusz Felisiak
2019-01-27Removed default mode='r' argument from calls to open().Jon Dufresne
2019-01-21Fixed #30106 -- Made order_with_respect_to updates use QuerySet.bulk_update().Simon Charette
2019-01-21Fixed #30120 -- Fixed invalid SQL in distinct aggregate.Simon Charette
Regression in bc05547cd8c1dd511c6b6a6c873a1bc63417b111 (refs #28658).
2019-01-17Refs #28750 -- Removed suppport for model Meta.manager_inheritance_from_future.Tim Graham
2019-01-17Refs #11557 -- Removed the field_name keyword argument to ↵Tim Graham
QuerySet.earliest() and latest(). Per deprecation timeline.
2019-01-17Refs #28370 -- Removed support for the context arg of Field.from_db_value() ↵Tim Graham
and Expression.convert_value(). Per deprecation timeline.
2019-01-16Fixed #30044 -- Raised a FieldError on inherited field update attempts.Simon Charette
2019-01-16Refs #9475 -- Simplified dictionary unpacking.Simon Charette
2019-01-15Refs #9475 -- Fixed typo, used unpacking generalization, and made ↵Nick Pope
through_defaults kwarg-only.
2019-01-15Fixed #9475 -- Allowed RelatedManager.add(), create(), etc. for m2m with a ↵Collin Anderson
through model.
2019-01-15Fixed #30099 -- Fixed invalid SQL when filtering a Subquery by an aggregate.Nasir Hussain
2019-01-14Removed unnecessary string formatting of strings.Jon Dufresne
2019-01-14Refs #28643 -- Extracted DurationField logic for Avg() and Sum() into mixin.Nick Pope
Also addresses Sum() not handling the filter option correctly.
2019-01-14Refs #28643 -- Changed Variance() to use NumericOutputFieldMixin.Nick Pope
Keeps precision instead of forcing DecimalField to FloatField.
2019-01-14Refs #28643 -- Changed StdDev() to use NumericOutputFieldMixin.Nick Pope
Keeps precision instead of forcing DecimalField to FloatField.
2019-01-14Refs #28643 -- Changed Avg() to use NumericOutputFieldMixin.Nick Pope
Keeps precision instead of forcing DecimalField to FloatField.