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

33771 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
antoliny0919
0b2493a0da Fixed #36558, Refs #36366 -- Fixed the "show all" link hover styling in admin pagination.
Regression in 3f59711581bd22ebd0f13fb040b15b69c0eee21f.
2025-08-22 09:25:03 +02:00
Clifford Gama
dd15f7dabb
Clarified "inline foreign key" to avoid confusion with generated fields in django/forms/models.py. 2025-08-21 13:28:30 -03:00
Natalia
d6a8e5f5e1 Fixed failing bulk_create test raising IntegrityError when run in reverse.
When running the `bulk_create` tests with Postgres settings and
`--reverse`, the following IntegrityError was raised in
bulk_create.tests.BulkCreateTransactionTests.test_objs_with_and_without_pk:

django.db.utils.IntegrityError: duplicate key value violates unique
constraint "bulk_create_country_pkey"
DETAIL:  Key (id)=(1) already exists.

This branch fixes this by ensuring the ID is unique since DB sequences
are not resetted between tests.
2025-08-21 12:25:57 -03:00
antoliny0919
aae7836cc0 Refs #36366 -- Fixed page number layout in admin pagination on small screens.
Regression in 3f59711581bd22ebd0f13fb040b15b69c0eee21f.
2025-08-21 17:04:28 +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
mengxun
ed7c1a5640 Fixed #36560 -- Prevented UpdateCacheMiddleware from caching responses with Cache-Control 'no-cache' or 'no-store'. 2025-08-21 16:48:36 +02:00
Jacob Walls
d3cf24e9b4 Refs #36430, #36416, #34378 -- Simplified batch size calculation in QuerySet.in_bulk(). 2025-08-21 16:47:41 +02:00
Jacob Walls
a2ce4900a6 Fixed #36430 -- Removed artificially low limit on single field bulk operations on SQLite. 2025-08-21 16:47:41 +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
7063d31cc3
Refs #35303 -- Made small optimizations in alogout() and aget_user().
In alogout(), there is no need to check the is_authenticated attribute
when user is None.

In aget_user(), there is no need to call get_session_auth_hash() twice.

Follow up to 50f89ae850f6b4e35819fe725a08c7e579bfd099.
2025-08-20 10:29:07 +02:00
Xinyi Rong
cd7554e551 Fixed #36561 -- Used request.auser() in contrib.auth.aupdate_session_auth_hash(). 2025-08-20 09:14:50 +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
Artyom Kotovskiy
f02b49d2f3 Fixed #27489 -- Renamed permissions upon model renaming in migrations. 2025-08-19 16:36:52 +02: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
Antoliny Lee
3bd583f55b
Refs #36528 -- Fixed link underline typo in CSS.
Regression in 792ca148a2d6da6cf0778f6a866c899208ab94f9.
2025-08-17 20:43:20 +02:00
Nick Pope
8b229b4dbb Refs #31123 -- Simplified create_contentypes().
Since 142ab6846ac09d6d401e26fc8b6b988a583ac0f5
get_contenttypes_and_models() function was only used in this module and
we only needed the model names, not the content type objects themselves.
2025-08-16 20:48:53 +02:00
Simon Charette
cd0966cd4e Avoided usage of DEBUG setting override in bulk_create tests.
Asserting an upper bound for the number of executed queries can be achieved by
using CaptureQueriesContext instead of enabling the whole DEBUG machinery.
2025-08-15 10:45:02 +02:00
Simon Charette
5eca562ac3 Refs #36490 -- Simplified QuerySet._batched_insert returning fields handling.
Whether or not returning_fields should be specified to _insert is not a
function of each batches so the conditional can be moved outside of the loop.
2025-08-15 10:45:02 +02:00
Simon Charette
e1671278e8 Fixed #36490 -- Avoided unnecessary transaction in bulk_create.
When dealing with an heterogeneous set of object with regards to primary key
assignment that fits in a single batch there's no need to wrap the single
INSERT statement in a transaction.
2025-08-15 10:45:02 +02: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
antoliny0919
a9b07cec03 Fixed #35924 -- Removed the "choose/remove all" button icons in the FilteredSelectMultiple widget. 2025-08-13 09:08:34 +02:00
Natalia
2980627502 Fixed #36499 -- Adjusted utils_tests.test_html.TestUtilsHtml.test_strip_tags following Python's HTMLParser new behavior.
Python fixed a quadratic complexity processing for HTMLParser in:
https://github.com/python/cpython/commit/6eb6c5db.
2025-08-12 23:04:09 -03:00
Natalia
e4515dad7a Fixed test_utils.tests.HTMLEqualTests.test_parsing_errors following Python's HTMLParser fixed parsing.
Further details about Python changes can be found in:
0243f97cba.

Thank you Clifford Gama for the thorough review!
2025-08-12 23:04:09 -03:00
michalpokusa
2c99fbcf95 Fixed #36368 -- Prevented duplicate locale paths and write_po_file calls in makemessages. 2025-08-12 09:47:16 +02:00
Tim Graham
80cc9994d1 Remove unused OneToOneField from DatabaseWrapper.data_types.
OneToOneField uses the type of the related field.
2025-08-12 09:46:20 +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
Jacob Walls
181e3bd71c Refs #36210 -- Corrected output_field comparison in Subquery.resolve_expression().
Regression in fd569dd45bf0746378faf7f65172497f21ed27f0.
2025-08-11 10:22:04 +02:00
Rohit
fa804d0d14 Corrected code examples in topics docs. 2025-08-11 10:12:43 +02:00
David Smith
7a80e29fea Improved docs.yml GitHub Action covering docs quality checks.
This change renames the `docs` job to `spelling` to better reflect its
purpose. It also removes the unused `--keep-going` flag, since starting
with Sphinx 8.1, `--keep-going` is enabled by default.

See:
https://www.sphinx-doc.org/en/master/man/sphinx-build.html#cmdoption-sphinx-build-keep-going
2025-08-08 16:39:50 -03: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
Xinyi Rong
31a43c571f Fixed #36540 -- Updated request.auser() in contrib.auth.alogin() and contrib.auth.alogout(). 2025-08-08 09:51:03 +02:00
Alec Kerrigan
117f90dea5 Fixed typo in django/contrib/gis/geos/geometry.py. 2025-08-08 09:50:28 +02:00
Jacob Walls
fd569dd45b Fixed #36210, Refs #36181 -- Allowed Subquery usage in further lookups against composite pks.
Follow-up to 8561100425876bde3be4b2a22324655f74ff9609.

Co-authored-by: Simon Charette <charette.s@gmail.com>
2025-08-07 14:28:44 +02:00
Jacob Walls
de7bb7eab8 Refs #36210 -- Added missing limits in Subquery tests. 2025-08-07 14:28:44 +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
antoliny0919
6537732585 Fixed #36079 -- Fixed text size of TabularInline object titles. 2025-08-05 16:36:06 +02:00
Matthias Kestenholz
0a262c8407 Fixed #36537 -- Ensured unique HTML IDs for geometry widget option scripts in the admin.
This work amends the code from f2f6046c0f92ff1faed057da0711ac478eef439c
where multiple geometry widgets rendered `<script>` elements in the
admin with the same HTML `id`, resulting in invalid HTML and fragile
JavaScript selectors. Refs #25706.

This change uses the widget's textarea ID to generate a unique `id` for
each JSON options `<script>`, ensuring valid and robust markup.

Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
2025-08-05 11:35:04 -03: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
Mariusz Felisiak
e664c5afa9
Refs #36282 -- Fixed PrefetchRelatedMTICacheTests test ordering expectations. 2025-08-05 10:13:00 +02: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