1
0
mirror of https://github.com/django/django.git synced 2025-03-12 18:30:48 +00:00

33386 Commits

Author SHA1 Message Date
Chris Muthig
4b977a5d72 Fixed #35444 -- Added generic support for Aggregate.order_by.
This moves the behaviors of `order_by` used in Postgres aggregates into
the `Aggregate` class. This allows for creating aggregate functions that
support this behavior across all database engines. This is shown by
moving the `StringAgg` class into the shared `aggregates` module and
adding support for all databases. The Postgres `StringAgg` class is now
a thin wrapper on the new shared `StringAgg` class.

Thank you Simon Charette for the review.
2025-03-03 11:37:00 +01:00
Tim Graham
6d1cf5375f
Added some heading labels to to docs/topics/cache.txt. 2025-03-02 19:55:04 +01:00
Simon Charette
fc30355107 Fixed #36198 -- Implemented unresolved transform expression replacement.
This allows the proper resolving of F("field__transform") when
performing constraint validation.

Thanks Tom Hall for the report and Sarah for the test.
2025-03-01 19:57:53 +01:00
Mariusz Felisiak
ff3aaf036f
Applied Black's 2025 stable style.
https://github.com/psf/black/releases/tag/25.1.0
2025-03-01 19:41:37 +01:00
Sarah Boyce
ea1e3703be Added stub release notes and release date for 5.1.7, 5.0.13, and 4.2.20. 2025-02-27 16:03:26 +01:00
Jacob Walls
77666f2fa1 Refs #35617 -- Removed hardcoded pk in test_bulk_update_custom_get_prep_value(). 2025-02-27 09:42:08 +01:00
Clifford Gama
5a1cae3a56 Removed outdated docstring in tests/basic/models.py. 2025-02-25 15:22:08 +01:00
Jonathan Ströbele
240421c7c4 Fixed #36186 -- Added forloop.length variable within a template for loop. 2025-02-24 16:25:53 +01:00
Sarah Boyce
582ba18d56 Added security guideline on reasonable size limitations when rendering content via the DTL.
This also removes the need to add warnings for every Django template filter.
2025-02-24 08:51:08 +01:00
Sarah Boyce
5935336059 Added security reporting guidelines. 2025-02-24 08:51:08 +01:00
Sarah Boyce
cecb76a942 Updated expectations for when security reports will receive a reply. 2025-02-24 08:51:08 +01:00
enprava
51cab4ad51 Fixed #35705 -- Added Rotate GIS database function to rotate geometries. 2025-02-23 16:20:57 +01:00
saJaeHyukc
f7017db92c Fixed #35839 -- Fixed crash when adding GeneratedField with db_comment on MySQL.
Thanks Simon Charette for the test.

Signed-off-by: saJaeHyukc <wogur981208@gmail.com>
2025-02-22 18:14:37 +01:00
Joonas Häkkinen
87c5de3b7f Fixed #36200 -- Clarified MIDDLEWARE setting updates when using a custom RemoteUserMiddleware. 2025-02-20 16:12:28 +01:00
Adam Zapletal
43766c70bd Clarified admonition in GeneratedField docs. 2025-02-20 14:41:00 +01:00
Mariusz Felisiak
7500044a82 Refs #35167 -- Fixed test_bulk_update_custom_get_prep_value() crash on databases that don't support primitives in JSONFields.
For example on Oracle < 21c.
2025-02-20 08:14:18 +01:00
Mariusz Felisiak
65c46d6932
Fixed #35358, Refs #35234 -- Renamed _check() methods to check() for constraints. 2025-02-19 20:27:30 +01:00
Sarah Boyce
86493307f9 Fixed #35908 -- Retired the django-developers and django-users mailing lists.
Co-authored-by: Chaitanya Rahalkar <chaitanyarahalkar@squareup.com>
2025-02-19 12:14:27 +01:00
Mariusz Felisiak
2684a383bc Fixed docs build on Sphinx 8.2+. 2025-02-19 09:44:53 +01:00
Sarah Boyce
d764487e79 Refs #35999 -- Removed #django IRC channel reference from README.rst. 2025-02-19 08:38:24 +01:00
Jacob Walls
0bf412111b Fixed #35167 -- Delegated to super() in JSONField.get_db_prep_save().
Avoids reports of bulk_update() sending Cast expressions
to JSONField.get_prep_value().

Co-authored-by: Simon Charette <charette.s@gmail.com>
2025-02-18 17:28:24 +01:00
Sarah Boyce
9d22a7d8f0 Removed advice to propose a new contrib app. 2025-02-18 16:09:53 +01:00
Simon Charette
c3a23aa02f Fixed #36197 -- Fixed improper many-to-many count() and exists() for non-pk to_field.
Regression in 66e47ac69a7e71cf32eee312d05668d8f1ba24bb.

Thanks mfontana-elem for the report and Sarah for the tests.
2025-02-18 11:43:27 +01:00
Кайрат Макым
51398f8bd5 Fixed #31170 -- Added change event trigger to dismissRelatedLookupPopup. 2025-02-18 10:34:14 +01:00
Кайрат Макым
91bebf1adb Refs #31170 -- Added JavaScript tests for RelatedObjectLookups.js. 2025-02-18 10:34:14 +01:00
mimi89999
727731d76d Fixed #36179 -- Unhexed entries and removed duplicates in auth/common-passwords.txt.gz. 2025-02-18 08:58:49 +01:00
Mariusz Felisiak
efb7f9ced2
Refs #36005 -- Used datetime.UTC alias instead of datetime.timezone.utc.
datetime.UTC was added in Python 3.11.
2025-02-18 08:35:36 +01:00
Gaël Utard
0d1dd6bba0 Fixed #36191 -- Truncated the overwritten file content in FileSystemStorage. 2025-02-17 14:01:00 +01:00
antoliny0919
2fa1f99ab4 Fixed #36178 -- Applied consistent object quoting in admin delete confirmation page. 2025-02-17 11:04:10 +01:00
Adam Johnson
c07ba43c4b Refs #35704 -- Used copy.replace() in Operation.reduce() methods. 2025-02-16 19:32:36 +01:00
Simon Charette
2d34ebe49a Refs #35967 -- Deprecated BaseDatabaseCreation.create_test_db(serialize).
Given there are no longer any internal usages of serialize=True and it
poses a risk to non-test databases integrity it seems appropriate to
deprecate it.
2025-02-16 08:43:42 +01:00
Simon Charette
99ac8e2589 Refs #35967 -- Doc'd DatabaseCreation.serialize_db_to_string() method. 2025-02-16 08:37:55 +01:00
Simon Charette
dc69a63f84 Fixed #35967 -- Deferred test suite fixtures serialization after all dbs setup.
While the top-level objects fed to serialization are bound to the test
database being created nothing prevents code invoked during
serialization from performing queries against other connections entries
that haven't been swapped yet.

The reported example of that is a database router directing all reads to
a test mirror for a set of models involving auto-created many-to-many
fields. It might be tempting to address the many-to-many field case but
this a symptom of a larger problem where the test framework yields the
flow execution to user code that could interact with non-test databases
in unexpected ways.

Deferring test database fixture serialization until the point where all
connections entries have been swapped for their test equivalent ensures
that no code triggered during serialization can interact with non-test
databases.

Thanks Jake Howard for the report and Jacob Walls for the initial
investigation.
2025-02-16 07:58:15 +01:00
Simon Charette
df2c4952df Fixed #36173 -- Stabilized identity of Concat with an explicit output_field.
When Expression.__init__() overrides make use of *args, **kwargs
captures their argument values are respectively bound as a tuple and
dict instances. These composite values might themselves contain values
that require special identity treatments such as Concat(output_field)
as it's a Field instance.

Refs #30628 which introduced bound Field differentiation but lacked
argument captures handling.

Thanks erchenstein for the report.
2025-02-15 15:46:59 +01:00
Julien Palard
6fcd0440aa Fixed #36102 -- Moved i18n comments directly above the translatable string.
xgettext only extracts comment blocks if there is no program code between
the comment and the string that gets extracted. For details, see:
https://www.gnu.org/software/gettext/manual/html_node/xgettext-Invocation.html#Operation-mode

Black formatting has been turned off in some places to ensure the
comments are not moved, which previously resulted in them being removed
from the po files when scripts/manage_translations.py was run.
2025-02-14 15:22:41 +01:00
Luke Cousins
579a1c9996 Corrected wording in docs/ref/models/constraints.txt. 2025-02-14 15:19:12 +01:00
Jaime Terreu
d87bb0eb3e Fixed typo in docs/ref/databases.txt. 2025-02-14 15:15:27 +01:00
Kim Yeongbin
14b46c1b84
Corrected SHORT_DATE_FORMAT for Korean (ko). 2025-02-13 22:35:16 +01:00
Natalia
56e23b2319 Fixed #36158 -- Refactored shell command to improve auto-imported objects reporting. 2025-02-13 16:01:13 +01:00
Sarah Boyce
05002c153c Fixed #36182 -- Returned "?" if all parameters are removed in querystring template tag.
Thank you to David Feeley for the report and Natalia Bidart for the review.
2025-02-13 15:49:25 +01:00
Georgi Yanchev
0ee842bb45 Fixed #36146 -- Recorded applied/unapplied migrations recursively. 2025-02-13 12:52:06 +01:00
Mariusz Felisiak
54a902c6e8 Reverted "Refs #35803 -- Added support for __coveredby GIS lookup on MariaDB 11.7+."
This partly reverts commit 0b7edb9fcdd33d47ec5701b4f9b9553e27a88e95.

MariaDB reverted GIS functions.
2025-02-13 10:38:04 +01:00
Mariusz Felisiak
eb70aafdba Reverted "Fixed #35803 -- Added support for Collect, GeoHash, and IsValid on MariaDB 11.7+."
This reverts commit c77573716a58af32ffcfc4fe87ff9e5c97909bd2.

MariaDB reverted GIS functions.
2025-02-13 10:38:04 +01:00
Simon Charette
d386405e04 Refs #36181 -- Removed the obsolete SubqueryConstraint machinery.
Adding proper support for subquery right-hand-sides to TupleIn made it
obsolete.
2025-02-13 09:29:24 +01:00
Simon Charette
8561100425 Fixed #36181 -- Allowed Subquery usage in __in lookups against composite pks.
Thanks Jacob Walls for the report.
2025-02-13 09:29:24 +01:00
Tim Graham
47c837a1ff
Refs #23919 -- Removed Python 2 workaround in fixtures_regress.
This reverts commit 7e19641b0359c23105cc27eebd9ccb1963546f2a.
2025-02-11 18:38:58 +01:00
Simon Charette
41239fe34d Fixed #36149 -- Allowed subquery values against tuple exact and in lookups.
Non-tuple exact and in lookups have specialized logic for subqueries that can
be adapted to properly assign select mask if unspecified and ensure the number
of involved members are matching on both side of the operator.
2025-02-11 09:08:35 +01:00
Natalia
0597e8ad1e Refs #35515 -- Fixed shell command verbose output when auto-importing 0 or 1 object.
Co-authored-by: Salvo Polizzi <salvopolizzi03@gmail.com>
2025-02-10 22:58:26 -03:00
Natalia
44ccd20375 Refs #35515 -- Refactored internal get_and_report_namespace in the shell command. 2025-02-10 22:58:26 -03:00
Natalia
3839afb63a Refs #35515 -- Added missing docs for --no-imports flag for the shell command. 2025-02-10 22:58:26 -03:00