1
0
mirror of https://github.com/django/django.git synced 2025-04-22 00:04:43 +00:00

33504 Commits

Author SHA1 Message Date
Natalia
5020a9d43a Replaced '' with * for consistent emphasis styling in docs/howto/custom-template-tags.txt. 2025-04-15 14:48:55 -03:00
Ahmed Nassar
be402891cd Fixed #36311 -- Unified spelling of "hardcode" and its variants in docs.
Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
2025-04-15 14:48:55 -03:00
Ahmed Nassar
abbcef5280 Refs #36311 -- Unified spelling of "flatpage" in docs/ref/contrib/flatpages.txt. 2025-04-15 14:48:55 -03:00
Ahmed Nassar
8bca33f68a Fixed #36269 -- Documented how to test callable storage in FileField. 2025-04-15 10:05:59 +02:00
Ahmed Nassar
2c2f090555 Fixed #35993 -- Documented gettext f-string support limitations.
Thank you to Claude Paroz and Athena Wolfskämpf for the review.
2025-04-15 10:02:25 +02:00
Sarah Boyce
ab1b9cc1b3
Bumped versions in pre-commit and npm configurations. 2025-04-12 19:42:00 +02:00
Baptiste Mispelon
ac16d2876d
Fixed #36320 -- Ignored "duplicated_toc_entry" for ePub docs build. 2025-04-12 19:39:07 +02:00
Simon Charette
21f8be76d4 Fixed #36288 -- Addressed improper handling of duplicates in values_list().
Now that selected aliases are stored in sql.Query.selected: dict[str, Any]
the values_list() method must ensures that duplicate field name references are
assigned unique aliases.

Refs #28900.

Regression in 65ad4ade74dc9208b9d686a451cd6045df0c9c3a.

Thanks Claude for the report.
2025-04-11 09:04:49 +02:00
Andrew
2d1ac1dce8
Refs #36036 -- Removed unsupported 4D GEOS tests. 2025-04-09 22:40:55 -03:00
Sarah Boyce
1429e722f2 Sorted imports in django/templatetags/tz.py per isort. 2025-04-09 11:10:08 +02:00
Ahmed Nassar
522dd021b2 Fixed #35986 -- Fixed test classes with @translation.override decorator.
Co-authored-by: Simon Charette <charette.s@gmail.com>
2025-04-09 09:49:14 +02:00
Mike Edmunds
a627829e7b Refs #35581 -- Updated mail tests to include trailing newlines.
Python's modern email API will force a trailing newline onto all text/*
bodies and attachments. Updated mail tests to include (and check for)
the newline while still using the legacy email API.

See https://github.com/python/cpython/issues/121515 which reasons that,
apart from artificial test cases, most text content already ends in a
newline. If it doesn't, adding one won't change the meaning.
2025-04-09 09:46:10 +02:00
Clifford Gama
a2f7b3a6a0 Clarified url and name arguments in flatpages URLconf ref docs. 2025-04-08 22:02:10 -03:00
Natalia
f9f0a18327 Added missing closing parenthesis in docs/ref/contrib/flatpages.txt. 2025-04-08 22:02:10 -03:00
Simon Charette
71a19a0e47 Fixed #36301 -- Fixed select_for_update(of) crash when using values()/values_list().
Regression in 65ad4ade74dc9208b9d686a451cd6045df0c9c3a which allowed for
annotations to be SELECT'ed before model field references through
values()/values_list() and broke assumptions the select_for_update(of)
table infererence logic had about model fields always being first.

Refs #28900.

Thanks OutOfFocus4 for the report and Sarah for the test.
2025-04-07 22:56:40 +02:00
Sarah Boyce
8ad3e80e88 Fixed #36298 -- Truncated the overwritten file content in file_move_safe().
Regression in 58cd4902a71a3695dd6c21dc957f59c333db364c.

Thanks Baptiste Mispelon for the report.
2025-04-07 16:11:36 +02:00
Mariusz Felisiak
d4a2809c2b
Added supports_expression_defaults check in DefaultTests.test_full_clean() test. 2025-04-06 09:40:12 +02:00
Simon Charette
12b771a1ec Fixed #36299 -- Prevented field selection on QuerySet.alias() after values().
Regression in 65ad4ade74dc9208b9d686a451cd6045df0c9c3a.

Refs #28900.

Thanks Jeff Iadarola for the report and tests.

Co-Authored-By: OutOfFocus4 <jeff.iadarola@gmail.com>
2025-04-05 20:43:50 +02:00
Kelvin Adigwu
25f97e7bcf
Fixed #36156 -- Added supports_json_field check in test_db_default_output_field_resolving test. 2025-04-05 18:54:08 +02:00
Tim Graham
02e7a162a0
Refs #36088, Refs #36260 - Added supports_expression_defaults checks in bulk_create() tests. 2025-04-05 18:47:53 +02:00
Simon Charette
764af7a3d6 Fixed #36289 -- Fixed bulk_create() crash with nullable geometry fields on PostGIS.
Swapped to an allow list instead of a deny list for field types to
determine if the UNNEST optimization can be enabled to avoid further
surprises with other types that would require further specialization to
adapt.

Regression in a16eedcf9c69d8a11d94cac1811018c5b996d491.

Thanks Joshua Goodwin for the report and Sarah Boyce for the test.
2025-04-04 21:33:04 +02:00
Natalia
4a824b1313 Added usage for --since when fetching translations in docs/internals/howto-release-django.txt. 2025-04-04 15:55:07 -03:00
Natalia
e715b07cf3 Improved "fetch" translations helper to restrict the resulting set by date. 2025-04-04 15:55:07 -03:00
koffi
019acad112 Fixed #36255 -- Renamed the admin action button for improved accessibility. 2025-04-04 17:41:13 +02:00
Simon Charette
f7f38f3a0b Fixed #36290 -- Made TupleIn() lookup discard tuples containing None.
Just like the In() lookup discards of None members TupleIn() should
discard tuples containing any None as NULL != NULL in SQL and the
framework expects such queries to be elided under some circumstances.

Refs #31667, #36116.

Thanks Basptise Mispelon for bisecting the regression to 626d77e.
2025-04-03 20:40:43 +02:00
Simon Charette
543e17c440 Fixed #36292 -- Fixed crash when aggregating over a group mixing transforms and references.
Regression in 65ad4ade74dc9208b9d686a451cd6045df0c9c3a.

Refs #28900

Thanks Patrick Altman for the report.
2025-04-03 17:51:26 +02:00
Nick Pope
3ae049b26b Fixed #35980 -- Updated setuptools to normalize package names in built artifacts. 2025-04-03 12:37:04 -03:00
Sarah Boyce
c7ff347c64 Added stub release notes for 5.2.1. 2025-04-02 15:24:48 +02:00
Sarah Boyce
345ba995c0 Finalized release notes for Django 5.2. 2025-04-02 14:43:00 +02:00
Sarah Boyce
b83dab7d8d Added CVE-2025-27556 to security archive. 2025-04-02 13:31:24 +02:00
Sarah Boyce
39e2297210 Fixed CVE-2025-27556 -- Mitigated potential DoS in url_has_allowed_host_and_scheme() on Windows.
Thank you sw0rd1ight for the report.
2025-04-02 10:21:33 +02:00
Ahmed Nassar
00c68f03b5 Fixed #36267 -- Fixed contenttypes shortcut() view crash with an invalid object_id for a UUIDField pk. 2025-04-02 09:33:13 +02:00
Babak Mahmoudy
be1b776ad8 Fixed #36213 -- Doc'd MySQL's handling of self-select updates in QuerySet.update().
Co-authored-by: Andro Ranogajec <ranogaet@gmail.com>
2025-04-02 08:45:03 +02:00
Clifford Gama
3ee90747c8
Fixed typo in django/db/models/options.py. 2025-04-01 14:07:04 -03:00
nessita
a245604277
Fixed #36284, Refs #31170 -- Ensured related lookup popups are closed properly.
In the admin, when selecting related objects via the helpers defined in
`RelatedObjectLookups.js`, the `dismissRelatedLookupPopup` function was
attempting to access `window.relatedWindows`, which does not exist in
real execution, causing related lookup popups to remain open.
    
This change ensures that this code correctly accesses the module-local
`relatedWindows` by explicitly assigning it to `window.relatedWindows`.
    
Regression in 91bebf1adb43561b54bac18e76224759dc70acb3.
    
Thanks Matthias Kestenholz for the report, the fix ideas, and testing.

Co-authored-by: Matthias Kestenholz <mk@feinheit.ch>
2025-04-01 13:52:22 -03:00
Jacob Walls
a0fb35eb72 Fixed #36184 -- Allowed migrating forward to squashed migrations. 2025-04-01 09:35:37 +02:00
Mariusz Felisiak
12385b4fa7 Fixed #36283 -- Reverted "Fixed #35798, Refs #31641 -- Prevented admin navigation sidebar loading flicker."
This reverts commit 747b417a220b0412ed806001a383959449aac6da that caused
a visual regression when both navigation and filter sidebars are
visible.
2025-04-01 09:30:41 +02:00
Aarni Koskela
6b32506739 Fixes #36215 -- Included unpacking generalization notes in coding style guide (PEP-448). 2025-03-31 22:43:13 -03:00
Aarni Koskela
c972af69e2 Refs #28909 -- Simplified code using unpacking generalizations. 2025-03-31 22:43:13 -03:00
Anthony Joseph
6888375c53 Fixed #22977 -- Added system check for clashing managers and reverse related fields.
With thanks to  Konrad Świat, Loïc Bistuer, Russell Keith-Magee,
and Mariusz Felisiak.

Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2025-03-31 22:20:43 +02:00
Clifford Gama
9d5d0e8135 Clarified pre_delete and post_delete's origin attributes. 2025-03-31 16:10:44 +02:00
Sarah Boyce
cb27e5b9c0 Updated translations from Transifex.
Forwardport of cc31b389a11559396fc039511c0dc567d9ade469 from stable/5.2.x.
2025-03-31 16:06:56 +02:00
Song Junho
126417be43 Fixed #36265 -- Added support for serialization of ZoneInfo instances in migrations. 2025-03-31 13:44:54 +02:00
Mariusz Felisiak
02a5cbfe76 Refs #36055 -- Prevented overlap of object-tools buttons and page header in the admin on small screens.
Visual regression in b1324a680add78de24c763911d0eefa19b9263bc.
2025-03-31 09:15:58 +02:00
Mariusz Felisiak
281910ff8e
Fixed warnings per flake8 7.2.0.
https://github.com/PyCQA/flake8/releases/tag/7.2.0
2025-03-30 17:54:15 +02:00
saJaeHyukc
c1a4fccf53 Fixed #36239 -- Fixed a crash in ManyToManyField.through_fields check when to model is invalid.
Signed-off-by: saJaeHyukc <wogur981208@gmail.com>
2025-03-28 12:37:57 +01:00
Mariusz Felisiak
a0f50c2a48 Refs #34619 -- Fixed labels width in FilteredSelectMultiple in the admin.
Visual regression in 857b1048d53ebf5fc5581c110e85c212b81ca83a.
2025-03-28 09:53:02 +01:00
Carlton Gibson
5df512e53a Simplified Intersphinx configuration example.
docs.djangoproject.com had been updated to serve the object.inv file
from the default location, so the second tuple element can be None
(the "default" value).
2025-03-28 09:36:13 +01:00
Carlton Gibson
6e54e20cc3 Doc'd how to use Intersphinx in the reusable apps tutorial. 2025-03-27 17:35:12 +01:00
antoliny0919
849f8307a5 Fixed #34917 -- Underlined links in the main content area of the admin. 2025-03-27 13:27:33 +01:00