1
0
mirror of https://github.com/django/django.git synced 2025-08-23 10:19:13 +00:00

14342 Commits

Author SHA1 Message Date
Mariusz Felisiak
b3166e1e15 Refs #35530 -- Corrected deprecation message in auth.alogin().
Follow up to ceecd518b19044181a3598c55ebed7c2545963cc.
2025-08-22 16:14:09 +02:00
SaJH
f2a6c0477f Fixed #36399 -- Added support for multiple Cookie headers in HTTP/2 for ASGIRequest.
Signed-off-by: SaJH <wogur981208@gmail.com>
2025-08-21 16:48:54 +02:00
David Smith
fb0d463b1f Fixed #36382 -- Confirmed support for GDAL 3.11.
TIGER driver was removed in GDAL 3.11.

eb793be039
2025-08-21 16:46:41 +02:00
Mariusz Felisiak
bcddf641ae
Corrected release notes of calling format_html() without arguments. 2025-08-20 07:33:39 +02:00
mengxun
f5c944b314
Fixed spelling of "logged-in" when used as an adjective in docs. 2025-08-19 12:43:05 -03:00
antoliny0919
4187da258f Fixed #35892 -- Supported Widget.use_fieldset in admin forms. 2025-08-19 16:35:56 +02:00
David Smith
ad4a9e0f3b
Refs #25706 -- Fixed versionadded indentation in docs/ref/contrib/gis/forms-api.txt. 2025-08-18 18:21:00 -03:00
farhan
5e06b97095 Fixed #36410 -- Added support for Template Partials to the Django Template Language.
Introduced `{% partialdef %}` and `{% partial %}` template tags to
define and render reusable named fragments within a template file.
Partials can also be accessed using the `template_name#partial_name`
syntax via `get_template()`, `render()`, `{% include %}`, and other
template-loading tools.

Adjusted `get_template()` behavior to support partial resolution, with
appropriate error handling for invalid names and edge cases. Introduced
`PartialTemplate` to encapsulate partial rendering behavior.

Includes tests and internal refactors to support partial context
binding, exception reporting, and tag validation.

Co-authored-by: Carlton Gibson <carlton@noumenal.es>
Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
Co-authored-by: Nick Pope <nick@nickpope.me.uk>
2025-08-14 21:53:14 -03:00
David Sanders
fda3c1712a Aligned format of constraint examples in docs/ref/models/constraints.txt. 2025-08-13 09:09:19 +02:00
Jacob Walls
eed7f44244 Refs #36210 -- Added release note for further subquery support for composite pks.
Follow-up to fd569dd45bf0746378faf7f65172497f21ed27f0.
2025-08-11 10:22:59 +02:00
Rohit
fa804d0d14 Corrected code examples in topics docs. 2025-08-11 10:12:43 +02:00
James Bligh
c1aa4a7a79 Fixed #36525 -- Silenced individual deleted file messages in collectstatic --clear's default verbosity. 2025-08-08 09:52:16 +02:00
Sarah Boyce
0bff53b413 Added stub release notes for 5.2.6. 2025-08-06 10:32:17 +02:00
Sarah Boyce
8999b0e2bf Added release date for 5.2.5. 2025-08-06 09:58:49 +02:00
David Smith
7f9bf357fe Refs #36485 -- Grouped docs checks under a unified make check target.
Added a new 'check' rule to the docs Makefile which runs both the black
and spelling checks.
2025-08-05 12:18:19 -03:00
David Smith
cba7328196 Refs #34140 -- Added dedicated code block formatting section in docs/internals/contributing/writing-documentation.txt. 2025-08-05 12:18:19 -03:00
James Bligh
6142e3f347 Fixed #26583 -- Silenced individual clashing name warnings in collectstatic's default verbosity.
Made collectstatic report individual destination conflicts only at verbosity 2+.
Made verbosity level 1 report a summary count of skipped files.
2025-08-05 16:37:43 +02:00
jkhall81
2013092b69 Fixed #36530 -- Extended fields.E347 to check for ManyToManyField involving CompositePrimaryKey on either side.
Thanks to Jacob Walls for the report.
2025-08-05 08:34:40 -03:00
Natalia
9cec8d9f55 Fixed #36535 -- Ensured compatibility with docutils 0.19 through 0.22.
Regression in 65ab92f6a83644bbb555d0eff3a02d8d9301aba4.
2025-08-04 21:52:25 -03:00
Adam Zapletal
dca8284a37 Corrected assertNumQueries() example in docs/topics/testing/tools.txt. 2025-08-04 15:07:48 +02:00
Jacob Walls
8914f4703c Fixed #35972 -- Fixed lookup crashes after subquery annotations. 2025-08-04 10:14:01 +02:00
Simon Charette
079d31e698 Fixed #34871, #36518 -- Implemented unresolved lookups expression replacement.
This allows the proper resolving of lookups when performing constraint
validation involving Q and Case objects.

Thanks Andrew Roberts for the report and Sarah for the tests and review.
2025-08-04 09:22:53 +02:00
antoliny0919
94c2f3b993 Fixed #36055 -- Prevented overlap of object-tools buttons and page header in the admin. 2025-07-30 11:09:45 +02:00
Mariusz Felisiak
d55979334d Fixed #36531 -- Added forkserver support to parallel test runner. 2025-07-29 14:11:22 -03:00
Simon Charette
0a4999b422 Fixed #36522 -- Added support for filtering composite pks using a tuple of expressions.
Thanks Jacob Walls for the report, and Sarah Boyce and Mariusz Felisiak
for reviews.
2025-07-28 16:39:28 -03:00
Jordan Bae
fdeca38072 Moved manual testing instructions from intro to submitting patches docs.
The section on manual testing, including how to use a local checkout of
Django, is moved from the contribution intro to the submitting patches
docs. This makes it easier for reviewers and authors to follow best
practices.
2025-07-28 08:55:42 -03:00
Mike Edmunds
9ab1991689 Fixed #35581 -- Updated django.core.mail to Python's modern email API.
- Changed EmailMessage.message() to construct a "modern email API"
  email.message.EmailMessage and added policy keyword arg.
- Added support for modern MIMEPart objects in EmailMessage.attach()
  (and EmailMessage constructor, EmailMessage.attachments list).
- Updated SMTP EmailBackend to use modern email.policy.SMTP.

Deprecated:
- Attaching MIMEBase objects (replace with MIMEPart)
- BadHeaderError (modern email uses ValueError)
- SafeMIMEText, SafeMIMEMultipart (unnecessary for modern email)
- django.core.mail.forbid_multi_line_headers()
  (undocumented, but exposed via `__all__` and in wide use)
- django.core.mail.message.sanitize_address()
  (undocumented, but in wide use)

Removed without deprecation (all undocumented):
- EmailMessage.mixed_subtype
- EmailMultiAlternatives.alternative_subtype
- Support for setting (undocumented) EmailMessage.encoding property
  to a legacy email.charset.Charset object

Related changes:
- Dropped tests for incorrect RFC 2047 encoding of non-ASCII email
  address localparts. This is specifically prohibited by RFC 2047, and
  not supported by any known MTA or email client. (Python still
  mis-applies encoded-word to non-ASCII localparts, but it is a bug that
  may be fixed in the future.)
- Added tests that try to discourage using Python's legacy email APIs
  in future updates to django.core.mail.
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
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
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
Anthony Sottile
5488530a27 Fixed #36377 -- Added hints support to CreateExtension and subclasses. 2025-07-22 08:04:55 +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
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
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
Clifford Gama
ac2d907f45
Fixed typo in docs/ref/utils.txt. 2025-07-13 19:38:23 +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
Carlton Gibson
a8912e4383
Updated asgiref dependency. 2025-07-09 18:06:49 +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
Simon Charette
192bc7a7be Fixed #36464 -- Fixed "__in" tuple lookup on backends lacking native support.
When native support for tuple lookups is missing in a DB backend, it can
be emulated with an EXISTS clause. This is controlled by the backend
feature flag "supports_tuple_lookups".

The mishandling of subquery right-hand side in `TupleIn` (added to
support `CompositePrimaryKey` in Refs #373) was likely missed because
the only core backend we test with the feature flag disabled
(Oracle < 23.4) supports it natively.

Thanks to Nandana Raol for the report, and to Sarah Boyce, Jacob Walls,
and Natalia Bidart for reviews.
2025-06-30 20:15:25 -03:00
Rob Hudson
d63241ebc7 Fixed #15727 -- Added Content Security Policy (CSP) support.
This initial work adds a pair of settings to configure specific CSP
directives for enforcing or reporting policy violations, a new
`django.middleware.csp.ContentSecurityPolicyMiddleware` to apply the
appropriate headers to responses, and a context processor to support CSP
nonces in templates for safely inlining assets.

Relevant documentation has been added for the 6.0 release notes,
security overview, a new how-to page, and a dedicated reference section.

Thanks to the multiple reviewers for their precise and valuable feedback.

Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
2025-06-27 15:57:02 -03:00