1
0
mirror of https://github.com/django/django.git synced 2025-08-21 01:09:13 +00:00

33705 Commits

Author SHA1 Message Date
Mike Edmunds
20c62199ff Refs #35581 -- Added missing test for lazy email headers.
EmailMessage is intended to support lazy strings in any header field
(via coercion to `str` in forbid_multi_line_headers() called from
SafeMIMEMessage/Text/Multipart.__setitem__).
2025-07-25 13:50:02 +02:00
Mike Edmunds
f551aeb003 Fixed typo in docs/topics/email.txt. 2025-07-25 13:30:59 +02:00
Mohamed Amine Mahmoud
485f483d49 Fixed typo in django/middleware/gzip.py. 2025-07-24 08:39:07 +02:00
antoliny0919
d90bea1b06 Fixed #36516, Refs #36366 -- Fixed changelist footer layout with list_editable and list_filter.
Regression in 3f59711581bd22ebd0f13fb040b15b69c0eee21f.
2025-07-24 08:38:43 +02:00
Mike Edmunds
3ad0e759a6 Fixed #36500 -- Set flake8 max-doc-length config to 79 columns.
Set flake8 max-doc-length to 79 to enforce smaller line length limit
on docstrings and comments (per coding-style docs).

Updated docs to clarify both requirements are enforced by flake8 and
to remove some leftover language from the pre-black era.
2025-07-23 20:17:55 -03:00
Mike Edmunds
78298b5162 Refs #36500 -- Corrected rewrapped long lines fixed via a script.
Manually reformatted some comments and docstrings where autofix_w505.py
changed the meaning of the formatting.
2025-07-23 20:17:55 -03:00
django-bot
69a93a88ed Refs #36500 -- Rewrapped long docstrings and block comments via a script.
Rewrapped long docstrings and block comments to 79 characters + newline
using script from https://github.com/medmunds/autofix-w505.
2025-07-23 20:17:55 -03:00
Mike Edmunds
55b0cc2131 Refs #36500 -- Shortened some long docstrings and comments.
Manually reformatted some long docstrings and comments that would be
damaged by the to-be-applied autofixer script, in cases where editorial
judgment seemed necessary for style or wording changes.
2025-07-23 20:17:55 -03:00
Thibaud Colas
5527df9192 Added accessibility guidelines for contributors. 2025-07-23 16:40:51 +02:00
Sarah Boyce
1ecf6889ca Removed double spaces after periods and within phrases. 2025-07-23 10:09:43 -03:00
David Smith
1909108f9f Fixed #36009 -- Confirmed support for PostGIS 3.5. 2025-07-23 08:17:18 -03:00
David Smith
d0113c1711 Refs #36009 -- Adjusted gis_tests.geoapp.tests.GeoLookupTest.test_relate_lookup for bug in PostGIS.
ST_Relate() with PostGIS 3.5 and GEOS 3.13 gives a different result when
a series of calls are made vs. single call of the same function.

The fix for this is expected to be released in PostGIS 3.5.4 and 3.6.0.

https://lists.osgeo.org/pipermail/postgis-devel/2025-July/030581.html
https://trac.osgeo.org/postgis/ticket/5938
2025-07-23 08:17:18 -03:00
Claude Paroz
77d455ae73 Standardized how method_decorator is used in contrib.auth views and admin.
Updated django.contrib.auth's views and admin modules to apply
decorators consistently.
2025-07-22 16:29:14 -03:00
Mike Edmunds
a8536e33da Refs #36138 -- Corrected ADMINS setting format in django/conf/global_settings.py comment. 2025-07-22 13:53:56 +02:00
Mike Edmunds
0f5b573d3d Fixed incorrectly concatenated string in SimpleBlockTagTests.test_simple_block_tag_with_context_missing_content(). 2025-07-22 13:36:01 +02:00
Roel Delos Reyes
78fac1b047 Fixed #36226 -- Accepted str or bytes for password and salt in password hashers.
Co-authored-by: Screamadelica <1621456391@sjtu.edu.cn>
2025-07-22 12:15:10 +02:00
Take Weiland
e709301000 Fixed #36282 -- Used prefetched values in ForwardManyToOneDescriptor from indirect ancestors.
When looking for cached values in ManyRelatedManager and
ForwardManyToOneDescriptor walk up the whole chain of ancestors
(as long as they are cached) to find the prefetched relation.
2025-07-22 12:14:20 +02:00
Anthony Sottile
5488530a27 Fixed #36377 -- Added hints support to CreateExtension and subclasses. 2025-07-22 08:04:55 +02:00
David Smith
14fc2e9703 Improved consistency of GEOS error messages. 2025-07-21 22:23:29 -03:00
David Smith
414253866b Improved iteration of geometries in GEOS tests. 2025-07-21 22:23:29 -03:00
David Smith
49cb481f3d Added message to TypeError exceptions in GEOS WKTReader and WKBReader. 2025-07-21 22:23:29 -03:00
David Smith
ef42718a2b Used assertRaisesMessage and subTest where appropriate in GEOS tests. 2025-07-21 22:23:29 -03:00
LauHerregodts
896fa85b02
Fixed #36230 -- Improved color contrast for blockquote in admin.
Thanks Thibaud Colas for the review.
2025-07-20 21:12:46 +02:00
Ahmed Ibrahim
a5b0a618c3 Fixed #28696 -- Added GeometryType GIS database function and __geom_type lookup.
Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2025-07-20 11:18:38 +02:00
Sarah Boyce
6aa05fd232 Triggered window resize to fix layout issues. 2025-07-18 17:29:12 +02:00
nessita
e767bd6838
Refs #35680 -- Sorted shell default autoimports to prevent isort mismatches. 2025-07-18 08:47:44 -03:00
IsJn-227
be8c9b19ba Fixed #36456 -- Improved content type negotiation in technical 500 error response. 2025-07-18 10:18:22 +02:00
Clifford Gama
449b9f9aee Fixed #35728 -- Computed error messages in assertions only on test failures.
Performance regression in 1dae65dc63ae84be5002c37b4ddae0b9220e8808.

Thanks to Adam Johnson for the report.
2025-07-18 10:16:59 +02:00
Clifford Gama
04e813cd17 Refs #4476 -- Added tests for assertRedirects() when following redirect chains.
Thanks Natalia Bidart for the review.
2025-07-17 17:36:02 -03:00
Clifford Gama
024ea0f783 Split monolithic AssertContainsTests.test_contains() into focused tests.
Added a local helper to test assertion messages with and without a given
msg_prefix.
2025-07-17 17:36:02 -03:00
Mike Edmunds
6320915053 Refs #36163 -- Reordered EmailMessage options in docs/topics/email.txt.
Reordered the keyword-only EmailMessage parameters in the documentation
to group similar options together and move rarely used options later.

Used keywords for *all* parameters in EmailMessage examples to improve
clarity.
2025-07-17 14:01:16 -03:00
Mike Edmunds
fc793fc303 Fixed #36163 -- Deprecated most positional arguments in django.core.mail.
In public mail APIs, changed less frequently used parameters from
keyword-or-positional to keyword-only, emitting a warning during the
required deprecation period.
2025-07-17 14:01:16 -03:00
Mike Edmunds
5289ce65b9 Fixed get_connection() signature in docs/topics/email.txt.
django.core.mail.get_connection() has always supported only variable
keyword arguments (never variable positional arguments).
2025-07-17 14:01:16 -03:00
Salvo Polizzi
a5cd84ad20 Fixed #35680 -- Added automatic imports of common utilies to shell management command. 2025-07-17 12:51:43 +02:00
nessita
8499fba0e1
Fixed GitHub Action that checks commit prefixes to fetch PR head correctly. 2025-07-16 15:36:33 -03:00
Mike Edmunds
40d6eb2c01 Refs #35581 -- Added workaround for Python bug in mail tests.
See python/cpython#128110.
2025-07-16 15:33:14 +02:00
Mike Edmunds
5ca470a52e Refs #35581 -- Reduced implementation dependencies in mail tests.
Updated mail tests in preparation for migrating from Python's legacy
to modern email API. The updated tests will pass with either Python API,
and focus on desired outcomes (e.g., that a message with non-ASCII
content parses accurately at the receiving end) rather than specific
implementation details (e.g., where rfc2047 encoded-words are split).

In a few cases that are still implementation dependent, added comments
identifying behavior specific to the legacy email API and expected to
change under the modern one.

Added comments identifying tests that cover internal functions planned
for deprecation, and (where meaningful) added similar tests to verify
the equivalent behavior in non-deprecated features.

Removed obsolete tests left over from Python 2.
2025-07-16 15:33:14 +02:00
Mike Edmunds
f42b89f1bf
Fixed #36477, Refs #36163 -- Added @deprecate_posargs decorator to simplify deprecation of positional arguments.
This helper allows marking positional-or-keyword parameters as keyword-only with a deprecation period, in a consistent and correct manner.
2025-07-16 08:49:03 -03:00
nessita
10386fac00
Added GitHub Action to enforce stable branch commit message prefix. 2025-07-16 08:38:13 -03:00
Clifford Gama
ac2d907f45
Fixed typo in docs/ref/utils.txt. 2025-07-13 19:38:23 +02:00
Jacob Walls
43c68042c9
Skipped test_no_logs_without_debug test when the runner is invoked with --debug-sql. 2025-07-13 18:29:34 +02:00
Tim Schilling
395e498553 Added Django ecosystem page to the documentation. 2025-07-13 14:09:47 +02:00
Simon Charette
0fe218842e
Fixed #36502 -- Restored UNNEST strategy for foreign key bulk inserts on PostgreSQL.
Regression in 764af7a3d6c0b543dcf659a2c327f214da768fe4.
2025-07-10 18:33:00 +02:00
tinmarbusir
994950e886
Fixed typo in ReverseManyToOneDescriptor docstring. 2025-07-09 18:10:04 +02:00
Carlton Gibson
a8912e4383
Updated asgiref dependency. 2025-07-09 18:06:49 +02:00
Mariusz Felisiak
426be74022
Refs #35844, #35945 -- Used asgiref.sync.iscoroutinefunction() instead of deprecated asyncio.iscoroutinefunction().
Follow up to bd3b1dfa2422e02ced3a894adb7544e42540c97d.
Introduced in 2ae3044d9d4dfb8371055513e440e0384f211963.

Fixes DeprecationWarning:

'asyncio.iscoroutinefunction' is deprecated and slated for removal
in Python 3.16; use inspect.iscoroutinefunction() instead.
2025-07-09 18:01:44 +02:00
Clifford Gama
6df19412aa
Refs #27236 -- Removed references to removed index_together migration methods. 2025-07-03 15:23:25 +02:00
Natalia
94ebcf8366 Added release date for 5.2.4. 2025-07-02 15:55:14 -03:00
Natalia
7ab6b863da Added stub release notes for 5.2.5. 2025-07-02 15:51:02 -03:00
Matthew Stell
7feafd79a4 Fixed #35846 -- Ensured consistent path ordering in ManifestStaticFilesStorage manifest files.
This change reuses the existing sorting of `hashed_files` in
`ManifestStaticFilesStorage.save_manifest` to also store a sorted
`paths` mapping in the manifest file. This ensures stable manifest
output that does not change unnecessarily.
2025-07-01 15:24:34 -03:00