1
0
mirror of https://github.com/django/django.git synced 2025-09-10 11:09:12 +00:00

33796 Commits

Author SHA1 Message Date
David Smith
05bac8c420 Refs #36570 -- Added sphinxlint checker to flag unnecessary :py domain in documentation roles. 2025-08-28 08:52:43 +02:00
SaJH
3c0c54351b Fixed #36570 -- Removed unnecessary :py domain from documentation roles.
Signed-off-by: SaJH <wogur981208@gmail.com>
2025-08-28 08:52:43 +02:00
Tim Graham
1285de557b Fixed incorrect IDs in test_in_bulk_preserve_ordering. 2025-08-27 18:23:42 -04:00
Adam Johnson
d8426f64a7 Fixed #36577 -- Removed obsolete try-except for GIS layermapping imports. 2025-08-27 13:16:28 -03:00
Natalia
4f07767106 Added matrix with newer image versions to the "postgis" GitHub Action.
This work allows to test three types of postgis Docker images to cover
a wider spectrum of geo libraries versions:

* `latest` (recommended upstream): uses latest stable Debian packages.
  These versions are generally conservative, so they may lag behind.
* `alpine`: build PostGIS from source on Alpine, and ship newer
  geospatial libs.
* `master`: provides development versions, therefore coverage for what's
  coming. Future compatibility issues can be caught in advance.

This split is important because each image differs significantly in
GEOS/PROJ/GDAL versions, so testing all increases confidence in
compatibility. More info at https://hub.docker.com/r/postgis/postgis/.

For example, at the time of this branch:

* latest stable in debian:
  * POSTGIS="3.5.2 dea6d0a"
  * GEOS="3.9.0-CAPI-1.16.2"
  * PROJ="7.2.1"
* latest stable in alpine:
  * POSTGIS="3.5.3 0"
  * GEOS="3.13.1-CAPI-1.19.2"
  * PROJ="9.6.0
* latest development branch:
  * POSTGIS="3.6.0dev 3.6.0beta1-29-g7c8cfe07d"
  * GEOS="3.14.0beta2-CAPI-1.20.1"
  * PROJ="9.7.0"
2025-08-27 11:33:13 -03:00
Natalia
1b0c4d5ea5 Ensured apt repo is updated before installing deps in "postgis" GitHub Action. 2025-08-27 11:33:13 -03:00
Sarah Boyce
4c71e33440 Added stub release notes and release date for 5.2.6, 5.1.12, and 4.2.24. 2025-08-27 16:01:20 +02:00
Sarah Boyce
d0e4dd5cdd Fixed #36572 -- Revert "Fixed #36546 -- Deprecated django.utils.crypto.constant_time_compare() in favor of hmac.compare_digest()."
This reverts commit 0246f478882c26bc1fe293224653074cd46a90d0.
2025-08-27 10:50:50 +02:00
Jacob Walls
c594574175 Clarified Trac "version" attribute in contributing guide. 2025-08-26 17:49:06 -04:00
Jacob Walls
d454aefbd1
Refs #15727 -- Captured failed request log in CSPMiddlewareTest. 2025-08-26 17:26:01 -04:00
Jacob Walls
66082a7dac
Corrected definition of "needsinfo" triage stage in contributing guide. 2025-08-26 16:00:47 -04:00
David Smith
07f44c9e9a Fixed #36568 -- Confirmed support for GEOS 3.14. 2025-08-26 16:01:41 -03:00
antoliny0919
3e7aedfb2e Fixed #36556 -- Fixed TabularInline width overflowing the page. 2025-08-26 13:45:28 +02:00
Natalia
9efce80ca7 Refs #36485 -- Ignored line-length formatting changes in git blame. 2025-08-26 08:31:24 -03:00
David Smith
43e4d0a142 Fixed #36485 -- Added lint-docs check in Tox and GitHub Actions.
The `check` docs target now runs spelling, black, and lint, so all
current documentation quality checks can be run with a single command.

Also documented the lint-docs check's availability and usage.
2025-08-25 10:51:10 -03:00
David Smith
f81e6e3a53 Refs #36485 -- Rewrapped docs to 79 columns line length.
Lines in the docs files were manually adjusted to conform to the
79 columns limit per line (plus newline), improving readability and
consistency across the content.
2025-08-25 10:51:10 -03:00
Natalia
4286a23df6 Refs #36485 -- Removed double spaces after periods in sentences. 2025-08-25 10:51:10 -03:00
Natalia
01a460f23e Refs #36485 -- Removed trailing spaces and tabs in docs. 2025-08-25 10:51:10 -03:00
David Smith
724e5ec6f2 Refs #36485 -- Fixed dangling hyphen and unbalanced inline markup in docs. 2025-08-25 10:51:10 -03:00
David Smith
6f8e23d1c1 Refs #36485 -- Removed unnecessary parentheses in :meth: and :func: roles in docs. 2025-08-25 10:51:10 -03:00
David Smith
ef2f16bc48 Refs #36485 -- Added sphinx-lint support and make lint rule for docs.
This adds a `lint.py` script to run sphinx-lint on Django's docs files,
a mathing `lint` target in the `docs/Makefile` and `docs/make.bat`, and
updates `docs/requirements.txt` accordingly.
2025-08-25 10:51:10 -03:00
SaJH
0246f47888 Fixed #36546 -- Deprecated django.utils.crypto.constant_time_compare() in favor of hmac.compare_digest().
Signed-off-by: SaJH <wogur981208@gmail.com>
2025-08-25 14:45:16 +02:00
SaJH
3ba24c18e7 Fixed #36251 -- Avoided mutating form Meta.fields in BaseInlineFormSet.
Signed-off-by: SaJH <wogur981208@gmail.com>
2025-08-25 10:05:45 +02:00
Jacob Walls
165ad74c57
Removed reference to flake8 file exclusions.
Obsolete since 41384812efe209c8295a50d78b45e0ffb2992436.
(six was removed in 9285926295fbfc86b70e7be8d595d4cfbe7895b8.)
2025-08-23 20:01:00 +02:00
Simon Charette
836894f27a Refs #470 -- Adjusted Field.db_returning to be backend agnostic.
Determining if a field is db_returning based on the default connection
feature availability prevents the usage of RETURNING for db_default
fields in setups where non-default backends do support RETURNING.

Whether or not the field should be attempted to be returned is already
checked at the compiler level which is backend aware.
2025-08-23 18:09:43 +02:00
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