summaryrefslogtreecommitdiff
path: root/django/db/models
AgeCommit message (Collapse)Author
2019-03-22[2.2.x] Fixed #30280 -- Restored Model.get_FIELD_display()'s coercion of ↵Matthias Kestenholz
lazy strings. Reverted cc79c7ee637e65c8da27e56d746c87903d5ec901. Backport of ea071870f943c23a8eaf36dfcdf382afd6478fd1 from master.
2019-03-14[2.2.x] Fixed #30254 -- Allowed model metaclasses to access the attribute ↵Matt Westcott
dict in __init__(). Regression in a68ea231012434b522ce45c513d84add516afa60. Backport of 58ad030d05fa50cfed327368ab61defca3303e02 from master.
2019-02-13[2.2.x] Fixed #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. Backport of 2bd8df243ac6fc35e58c9fe90b20c9e42519a5ac from master.
2019-01-30[2.2.x] Fixed E117 and F405 flake8 warnings.Mariusz Felisiak
Backport of 5a5c77d55dc85c7e6cf910243257e408887f412a from master
2019-01-21[2.2.x] Fixed #30120 -- Fixed invalid SQL in distinct aggregate.Simon Charette
Regression in bc05547cd8c1dd511c6b6a6c873a1bc63417b111 (refs #28658). Backport of 65858119d23e37872505a4476e7141c33981fb50 from master.
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.
2019-01-14Refs #28643 -- Moved db function mixins to a separate module.Nick Pope
2019-01-14Avoided calling as_oracle() for SQLite in Left database function.Nick Pope
2019-01-14Corrected comment in TruncTime database function.Nick Pope
2019-01-14Simplified overriding source expressions in some database functions.Nick Pope
2019-01-14Fixed #30093 -- Fixed ordering of combined queryset ordered by F expressions.Sergey Fedoseev
2019-01-12Refs #28643 -- Added Reverse database function.Nick Pope
Thanks Mariusz Felisiak for Oracle advice and review.
2019-01-12Fixed #30062 -- Added support for unique conditional constraints.Paveł Tyślacki
2019-01-12Used None as the empty value for condition in Index's SQL construction.Paveł Tyślacki
2019-01-11Moved django.db.migrations.writer.SettingsReference to django.conf.Tim Graham
Reduces the possibility of circular imports.
2019-01-10Refs #28643 -- Added NullIf database function.Mads Jensen
Thanks Nick Pope, Mariusz Felisiak, and Tim Graham for reviews.
2019-01-09Fixed #28658 -- Added DISTINCT handling to the Aggregate class.Simon Charette
2019-01-08Simplified some imports for database functions.Nick Pope
Used more specific modules to reduce the risk of circular imports.
2019-01-02Used 4 space hanging indent for dictionaries.Tim Graham
Thanks Mariusz Felisiak for auditing.
2019-01-01Fixed #30060 -- Moved SQL generation for indexes and constraints to ↵Paveł Tyślacki
SchemaEditor.
2018-12-30Renamed QuerySet.earliest()/latest() helper method.Tim Graham
2018-12-27Fixed #29851 -- Fixed crash of annotations with window expressions in Subquery.Mariusz Felisiak
2018-12-22Fixed #29970, #30041 -- Made ModelBase.__new__() pass attrs without ↵Sergey Fedoseev
contribute_to_class() to type.__new__().
2018-12-06Fixed #29932 -- Fixed combining compound queries with sub-compound queries ↵Mariusz Felisiak
on SQLite and Oracle.
2018-12-06Fixed #30011 -- Fixed queries that reuse filtered aggregates.Simon Charette
Thanks Taqi Abbas and Raphael Kimmig for the report.
2018-11-30Refs #28643 -- Skipped ATan2() workaround on SpatiaLite 5+.Nick Pope
2018-11-30Fixed #30001 -- Marked UUIDField.description for translation.Prabakaran Kumaresshan
2018-11-23Refs #23801 -- Made integer field max_length warning show correct field type.Nick Pope
2018-11-23Removed redundant BigIntegerField.empty_strings_allowed (already inherited).Nick Pope
2018-11-21Fixed #29974 -- Fixed non-truthy primary key values for QuerySet.bulk_update().Tom Forbes
2018-11-21Fixed #29949 -- Refactored db introspection identifier converters.Mariusz Felisiak
Removed DatabaseIntrospection.table_name_converter()/column_name_converter() and use instead DatabaseIntrospection.identifier_converter(). Removed DatabaseFeatures.uppercases_column_names. Thanks Tim Graham for the initial patch and review and Simon Charette for the review.
2018-11-17Refs #29908 -- Optimized known related objects assignment.Simon Charette
Since CPython implements a C level attrgetter(*attrs) it even outperforms the most common case of a single known related object since the resulting attribute values tuple is built in C.
2018-11-15Fixed #17930 -- Allowed ORing (|) with sliced QuerySets.Ian Foote
2018-11-14Fixed #29835 -- Made RelatedFieldListFilter respect ModelAdmin.ordering.Hasan Ramezani
2018-11-13Fixed #29641 -- Added support for unique constraints in Meta.constraints.Simon Charette
This constraint is similar to Meta.unique_together but also allows specifying a name. Co-authored-by: Ian Foote <python@ian.feete.org>
2018-11-13Refs #29641 -- Refactored database schema constraint creation.Simon Charette
Added a test for constraint names in the database. Updated SQLite introspection to use sqlparse to allow reading the constraint name for table check and unique constraints. Co-authored-by: Ian Foote <python@ian.feete.org>
2018-11-08Fixed #29908 -- Fixed setting of foreign key after related set access if ↵Simon Charette
ForeignKey uses to_field. Adjusted known related objects handling of target fields which relies on from and to_fields and has the side effect of fixing a bug bug causing N+1 queries when using reverse foreign objects. Thanks Carsten Fuchs for the report.
2018-10-29Fixed #29547 -- Added support for partial indexes.Mads Jensen
Thanks to Ian Foote, Mariusz Felisiak, Simon Charettes, and Markus Holtermann for comments and feedback.
2018-10-28Fixed #29896 -- Fixed incorrect Model.save() cache relation clearing for ↵Tim Graham
foreign keys that use to_field. Regression in ee49306176a2d2f1751cb890bd607d42c7c09196.
2018-10-24Fixed #29869 -- Made UUIDField.to_python() convert integers.Sanyam Khurana
2018-10-22Fixed #27595 -- Made ForeignKey.get_col() follow target chains.Simon Charette
Previously, foreign relationships were followed only one level deep which prevents foreign keys to foreign keys from being resolved appropriately. This was causing issues such as improper database value conversion for UUIDField on SQLite because the resolved expression's output field's internal type wasn't correct. Added tests to make sure unlikely foreign reference cycles don't cause recursion errors. Refs #24343. Thanks oyooyo for the report and Wayne Merry for the investigation.