summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2025-02-06Refs #34975 -- Removed unnecessary lookups.In.get_refs().Simon Charette
Now that In.get_source_expression() includes its right-hand-side when it contains expressions (refs #36025) it no longer requires a specialized get_refs() method.
2025-02-06Fixed #36025 -- Fixed re-aliasing of iterable (in/range) lookups rhs.Simon Charette
In order for Expression.relabeled_clone to work appropriately its get_source_expressions method must return all resolvable which wasn't the case for Lookup when its right-hand-side is "direct" (not a compilable). While refs #22288 added support for non-literals iterable right-hand-side lookups it predated the subclassing of Lookup(Expression) refs #27021 which could have been an opportunity to ensure right-hand-sides are always resolvable (ValueList and ExpressionList). Addressing all edge case with non-resolvable right-hand-sides would require a significant refactor and deprecation of some parts of the Lookup interface so this patch only focuses on FieldGetDbPrepValueIterableMixin (In and Range lookups) by making sure that a right-hand-side containing resolvables are dealt with appropriately during the resolving phase. Thanks Aashay Amballi for the report.
2025-02-06Fixed #36061 -- Added migration support for ManyToManyField.through_fields.brian
Added through_fields support to ManyToManyField.deconstruct. Thanks to Simon Charette for pointers and the review.
2025-02-06Fixed #35677 -- Avoided non-sticky filtering of prefetched many-to-many.Simon Charette
The original queryset._next_is_sticky() call never had the intended effect as no further filtering was applied internally after the pk__in lookup making it a noop. In order to be coherent with how related filters are applied when retrieving objects from a related manager the effects of what calling _next_is_sticky() prior to applying annotations and filters to the queryset provided for prefetching are emulated by allowing the reuse of all pre-existing JOINs. Thanks David Glenck and Thiago Bellini Ribeiro for the detailed reports and tests.
2025-02-06Refs #22997 -- Prevented requesting a default value for auto fields.Ben Cail
2025-02-05Fixed #36165 -- Made PostgreSQL's SchemaEditor._delete_index_sql() respect ↵Natalia
the "sql" argument. This is a follow up of bd366ca2aeffa869b7dbc0b0aa01caea75e6dc31. Thank you Daniel Finch for the report.
2025-02-05Added stub release notes for 5.1.7.Natalia
2025-02-05Added release date for 5.1.6, 5.0.12, and 4.2.19.Natalia
2025-02-04Clarified docs for default email value in UserManager.create_user().amirreza sohrabi far
2025-02-04Refs #35612 -- Extended docs on how the security team evaluates reports.nessita
Co-authored-by: Shai Berger <shai@platonix.com>
2025-02-04Fixed #36069 -- Fixed the delete button position in TabularInlines.antoliny0919
2025-02-04Fixed #36055 -- Prevented overlap of object-tools buttons and page header in ↵antoliny0919
the admin.
2025-02-04Fixed #36058 -- Refactored SpatialRefSysMixin.srs to use cached_property.Arnaldo Govenem
Replaced manual caching complexity with cached_property for efficiency. Enhanced error handling with distinct messages for WKT and PROJ.4. Thanks to Sarah Boyce for the suggestions.
2025-02-03Refs #36036 -- Added support for GEOSHasM.Andrew Harris
2025-02-03Fixed #36135 -- Fixed reverse GenericRelation prefetching.Simon Charette
The get_(local|foreign)_related_value methods of GenericRelation must be reversed because it defines (from|to)_fields and associated related_fields in the reversed order as it's effectively a reverse GenericForeignKey itself. The related value methods must also account for the fact that referenced primary key values might be stored as a string on the model defining the GenericForeignKey but as integer on the model defining the GenericRelation. This is achieved by calling the to_python method of the involved content type in get_foreign_related_value just like GenericRelatedObjectManager does. Lastly reverse many-to-one manager's prefetch_related_querysets should use set_cached_value instead of direct attribute assignment as direct assignment might are disallowed on ReverseManyToOneDescriptor descriptors. This is likely something that was missed in f5233dc (refs #32511) when the is_cached guard was added. Thanks 1xinghuan for the report.
2025-02-01Fixed #36140 -- Allowed BaseUserCreationForm to define non required password ↵nessita
fields. Regression in e626716c28b6286f8cf0f8174077f3d2244f3eb3. Thanks buffgecko12 for the report and Sarah Boyce for the review.
2025-02-01Fixed #36162 -- Fixed the `black` Makefile docs rule to work on macOS.Mike Edmunds
The `make black` target in the docs directory used Linux-specific syntax for its `find` command. Changed to syntax that also works on macOS and other BSD Unix variants.
2025-02-01Fixed #36088 -- Avoided unnecessary DEFAULT usage on bulk_create().Simon Charette
When all values of a field with a db_default are DatabaseDefault, which is the case most of the time, there is no point in specifying explicit DEFAULT for all INSERT VALUES as that's what the database will do anyway if not specified. In the case of PostgreSQL doing so can even be harmful as it prevents the usage of the UNNEST strategy and in the case of Oracle, which doesn't support the usage of the DEFAULT keyword, it unnecessarily requires providing literal db defaults. Thanks Lily Foote for the review.
2025-02-01Bumped versions in pre-commit and npm configurations.Mariusz Felisiak
2025-01-31Fixed #36119 -- Fixed UnicodeEncodeError when attaching a file with 8bit ↵greg
Content-Transfer-Encoding.
2025-01-30Tweaked docs to avoid reformatting given new black version.nessita
2025-01-30Fixed #35235 -- Removed caching of BaseExpression._output_field_or_none.sharonwoo
2025-01-30Fixed #36121 -- Allowed customizing the admin site password change form.Mohammadreza Eskandari
2025-01-30Fixed #36155 -- Improved error handling when annotate arguments require an ↵Vinko Mlačić
alias. Regression in ed0cbc8d8b314e3b4a0305d0be3cf366d8ee4a74.
2025-01-30Fixed #36159 -- Removed the empty import example in the custom shell docs.Salvo Polizzi
This can be achieved with the --no-imports flag.
2025-01-29Fixed #36118 -- Accounted for multiple primary keys in bulk_update ↵Sarah Boyce
max_batch_size. Co-authored-by: Simon Charette <charette.s@gmail.com>
2025-01-28Pinned isort version to "<6.0.0" to avoid undesired reformat.nessita
2025-01-28Clarified the Releaser's discretion for determining and postponing the ↵Sarah Boyce
release date.
2025-01-28Fixed #36122 -- Raised FieldError when updating with composite reference value.Simon Charette
Thanks Jacob Walls for the report and test.
2025-01-28Updated the release process documentation to reflect the current process.Sarah Boyce
2025-01-28Fixed #36120 -- Raised FieldError when targeting a composite primary key ↵Jacob Walls
field with QuerySet.update().
2025-01-28Refs #36005 -- Bumped minimum supported versions of 3rd-party packages.Mariusz Felisiak
This bumps minimum supported versions of 3rd-party packages to the first releases to support Python 3.12.
2025-01-27Fixed #36109 -- Fixed RecursionError when stacking FilteredRelation joins.Peter DeVita
2025-01-27Captured stderr during admin_docs test.Adam Zapletal
The admindocs app doesn't pass a log level to docutils when it parses reStructured Text, so system messages can be logged during parsing.
2025-01-25Fixed #36111 -- Fixed test --debug-sql crash on Oracle when no prior query ↵Jacob Walls
has executed.
2025-01-24Fixed ambiguous pronoun reference in docs/ref/models/fields.txt.Clifford Gama
2025-01-23Refs #470 -- Fixed field_defaults test failures due to year-end boundary ↵Jacob Walls
conditions.
2025-01-23Clarified feature freeze tasks in docs/internals/howto-release-django.txt.nessita
Co-authored-by: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com>
2025-01-23Fixed #36010 -- Avoided touching mo files while checking writability.Claude Paroz
2025-01-23Fixed #36013 -- Removed use of IDNA-2003 in django.utils.html.Mike Edmunds
Removed obsolete and potentially problematic IDNA 2003 ("punycode") encoding of international domain names in smart_urlquote() and Urlizer, which are used (only) by AdminURLFieldWidget and the urlize/urlizetrunc template filters. Changed to use percent-encoded UTF-8, which defers IDNA details to the browser (like other URLs rendered by Django).
2025-01-23Refs #27674 -- Removed unused GIS icons.Claude Paroz
Unused since 4982958ec0c359908566fc1f34ef71297ea4337d.
2025-01-22Fixed #36125 -- Switched docs to use chat.djangoproject.com when referencing ↵Baptiste Mispelon
the Discord server.
2025-01-22Fixed #36114 -- Fixed link visibility when list_display_links field contains ↵antoliny0919
only whitespace.
2025-01-22Switched to pull_request_target event trigger in the Labels Github action.Sarah Boyce
The `pull_request` trigger runs in the context of the PR, and has limited access to information stored in the base repo django/django. As access is needed to the label "no ticket" in django/django, use the `pull_request_target` trigger.
2025-01-22Fixed #24529 -- Allowed double squashing of migrations.Georgi Yanchev
Co-authored-by: Raphael Gaschignard <raphael@rtpg.co>
2025-01-22Refs #24529 -- Added replace_migration hook to MigrationLoader.Georgi Yanchev
2025-01-22Fixed #36117 -- Raised ValueError when providing composite expressions to ↵Simon Charette
case / when. Remove redundant Case and When.resolve_expression to delegate composite expression support to BaseExpression. Thanks Jacob Tyler Walls for the report and test.
2025-01-22Refs #36042 -- Consolidated composite expression checks in BaseExpression.Simon Charette
Remove redundant Func.resolve_expression and adjust CombinedExpression to delegate source expression resolving to super() to perform checks against allows_composite_expressions in a single location.
2025-01-21Refs 35653 -- Clarified docs for EMAIL_SSL_CERTFILE and EMAIL_SSL_KEYFILE ↵Igor Scheller
settings.
2025-01-21Moved permissions setup to toplevel for the Labels Github action.nessita