summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-08-30Refs #30947 -- Changed tuples to lists where appropriate.Alex Morega
2022-08-30Fixed #21204 -- Tracked field deferrals by field instead of models.Simon Charette
This ensures field deferral works properly when a model is involved more than once in the same query with a distinct deferral mask.
2022-08-30Refs #21204 -- Added more QuerySet.defer()/only() tests for invalid fields.Simon Charette
2022-08-30Merged nested if statements in select_related_descend().Simon Charette
2022-08-30Fixed #33958 -- Added imports to examples in "Expressions can reference ↵Iván Camilo Triviño López
transforms" section.
2022-08-29Improved example of index on SearchVector in full text search docs.Ilia Peterov
2022-08-29Refs #33953 -- Fixed test_rename_model_with_db_table_rename_m2m() crash on ↵Mariusz Felisiak
SQLite < 3.20.
2022-08-29Fixed #33960 -- Fixed migrations crash on SQLite < 3.26.Mariusz Felisiak
Regression in 0b95a96ee10d3e12aef01d449467bcf4641286b4. Thanks Aristotelis Mikropoulos for the report.
2022-08-29Refs #28333 -- Fixed NonQueryWindowTests.test_invalid_filter() on databases ↵Mariusz Felisiak
that don't support window expressions.
2022-08-27Fixed #33954 -- Prevented models.DecimalField from accepting NaN, Inf, and ↵Mohamed Karam
-Inf values.
2022-08-27Fixed #33952 -- Reallowed creating reverse foreign key managers on unsaved ↵David Wobrock
instances. Thanks Claude Paroz for the report. Regression in 7ba6ebe9149ae38257d70100e8bfbfd0da189862.
2022-08-27Fixed #33928 -- Avoided unnecessary queries when cascade updating.Simon Charette
Models that use SET, SET_NULL, and SET_DEFAULT as on_delete handler don't have to fetch objects for the sole purpose of passing them back to a follow up UPDATE query filtered by the retrieved objects primary key. This was achieved by flagging SET handlers as _lazy_ and having the collector logic defer object collections until the last minute. This should ensure that the rare cases where custom on_delete handlers are defined remain uncalled when when dealing with an empty collection of instances. This reduces the number queries required to apply SET handlers from 2 to 1 where the remaining UPDATE use the same predicate as the non removed SELECT query. In a lot of ways this is similar to the fast-delete optimization that was added in #18676 but for updates this time. The conditions only happen to be simpler in this case because SET handlers are always terminal. They never cascade to more deletes that can be combined. Thanks Renan GEHAN for the report.
2022-08-27Refs #33928 -- Removed unnecessary attribute assignment on on-delete updates.Simon Charette
Model instances retrieved for bulk field update purposes are not exposed to the outside world and thus are not required to be kept update to date.
2022-08-26Refs #30511 -- Updated docs about auto-incrementing primary keys on PostgreSQL.Mariusz Felisiak
Follow up to 2eea361eff58dd98c409c5227064b901f41bd0d6.
2022-08-26Fixed #33953 -- Reverted "Fixed #33201 -- Made RenameModel operation a noop ↵Iuri de Silvio
for models with db_table." Regression in afeafd6036616bac8263d762c1610f22241c0187. This reverts afeafd6036616bac8263d762c1610f22241c0187. Thanks Timothy Thomas for the report.
2022-08-25Fixed #33938 -- Fixed migration crash for m2m with a through model in ↵Simon Charette
another app. Regression in aa4acc164d1247c0de515c959f7b09648b57dc42. Thanks bryangeplant for the report.
2022-08-25Fixed typo in django/db/models/fields/files.py comment.Jan Pieter Waagmeester
2022-08-25Fixed #33830 -- Fixed VariableDoesNotExist when rendering ClearableFileInput.Neeraj Kumar
2022-08-25Refs #18707 -- Corrected django.test.Client signature in docs.Daniel Hahler
2022-08-25Fixed #33916 -- Added support for serialization of enum.Flag in migrations.Willem Van Onsem
2022-08-24Refs #27412 -- Confirmed support for executing Coalesce(subquery).Simon Charette
This has been supported for subqueries wrapped in Subquery since the expression was introduced and for Queryset directly since Subquery resolves to sql.Query. Piggy-backed on the existing tests covering Coalesce handling of EmptyResultSet as it seemed like a proper location to combine testing.
2022-08-24Fixed #33920 -- Doc'd dependency of LOGGING_CONFIG callback on non-empty ↵Kanza
LOGGING.
2022-08-23Fixed #33927 -- Fixed crash when displaying ArrayField with choices in admin.David Wobrock
2022-08-23Removed unused path variable in model_fields tests.Claude Paroz
2022-08-23Fixed #33949 -- Fixed fixture dirs duplicates with Path instances.Claude Paroz
2022-08-23Fixed #33939 -- Used functools.partial() in transaction.on_commit() examples.Alex Morega
2022-08-18Refs #26511 -- Fixed json.KeyTextTransform() on MySQL/MariaDB.Mariusz Felisiak
2022-08-18Used CSS flex for admin's submit row.Tom Carrick
2022-08-18Fixed #33930 -- Eased customization of delete_confirmation.html template in ↵Jacob Rief
the admin.
2022-08-17Fixed #33932 -- Fixed altering AutoFields to OneToOneField on PostgreSQL.Benoît Vinot
Regression in 2eea361eff58dd98c409c5227064b901f41bd0d6.
2022-08-17Refs #33491 -- Split CSS selected-row highlight selectors.Carlton Gibson
Combined selectors break the whole rule where :has() is not supported, for example on Firefox. Thanks to Marcelo Galigniana for the report.
2022-08-17Fixed #33491 -- Fixed change-list selected row-highlight on cancelled delete.Marcelo Galigniana
Selected rows where not highlighted when returning to the change-list after clicking "No, take me back" on the deletion confirmation page. This commit uses the CSS :has() pseudo-class to apply the highlight without requiring the .selected class, which is added by JavaScript on the click event. Once all supported browsers have :has() available, the .selected selector and the JavaScript to add the class can be removed. Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
2022-08-17Fixed #33878 -- Switched to system fonts in CSS.Tom Carrick
2022-08-17Fixed CSS variable indentation.Tom Carrick
Matches 4-space indentation used elsewhere in project CSS files.
2022-08-16Refs #33916 -- Added tests for serialization of enum.Flag in migrations.Willem Van Onsem
2022-08-16Fixed #33909 -- Corrected django.dispatch.receiver() signature.Youssef
2022-08-15Fixed #33778 -- Updated build-system configuration.Youssef
This removes unnecessary wheel dependency and __legacy__ fallback.
2022-08-15Fixed #26780 -- Added prefetch_related() support for sliced queries.Simon Charette
This was made possible by window function filtering support added in f387d024fc75569d2a4a338bfda76cc2f328f627.
2022-08-15Refs #28333 -- Added partial support for filtering against window functions.Simon Charette
Adds support for joint predicates against window annotations through subquery wrapping while maintaining errors for disjointed filter attempts. The "qualify" wording was used to refer to predicates against window annotations as it's the name of a specialized Snowflake extension to SQL that is to window functions what HAVING is to aggregates. While not complete the implementation should cover most of the common use cases for filtering against window functions without requiring the complex subquery pushdown and predicate re-aliasing machinery to deal with disjointed predicates against columns, aggregates, and window functions. A complete disjointed filtering implementation should likely be deferred until proper QUALIFY support lands or the ORM gains a proper subquery pushdown interface.
2022-08-15Fixed #33901 -- Skipped varchar_pattern_ops/text_pattern_ops index creation ↵Haolun Chai
when db_collation is set.
2022-08-12Fixed #33921 -- Added release note for 5b8699e723d9daf373fff46c6859fed2b780a9bd.Mohammadtaher Abbasi
2022-08-12Fixed #33919 -- Fixed adding AutoFields on PostgreSQL.Mariusz Felisiak
Thanks Jack Calvin Brown for the report. Regression in 2eea361eff58dd98c409c5227064b901f41bd0d6.
2022-08-12Fixed #33924 -- Deprecated BaseGeometryWidget.map_height/map_width attributes.Claude Paroz
2022-08-11Refs #28333 -- Moved SQLCompiler's forced column aliasing logic to get_select().Simon Charette
This extends query composability possibilities when dealing with subqueries which is necessary to implement window function filtering.
2022-08-11Refs #30213 -- Removed post-startup check for Watchman availability.Carlton Gibson
This is checked at startup in get_reloader(). The runtime check ties the implementation to Watchman excessively.
2022-08-11Replaced Expression.replace_references() with .replace_expressions().Simon Charette
The latter allows for more generic use cases beyond the currently limited ones constraints validation has. Refs #28333, #30581.
2022-08-11Optimized ExclusionConstraint.validate() a bit.Mariusz Felisiak
References to excluded fields are omitted in the replacement_map, so there is no need to replace references before checking for exclusions.
2022-08-11Used F.replace_references().Mariusz Felisiak
Follow up to 63884829acd207404f2a5c3cc1d6b4cd0a822b70.
2022-08-10Fixed #28975 -- Made PostGIS backend skip extension creation if installed.Rust Saiargaliev
2022-08-10Refs #33895 -- Fixed Case() crash with filters that match everything in ↵Mariusz Felisiak
When() on Oracle. Follow up to 036bb2b74afb50a71e7a945e8dd83499b603ac3a.