summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2 daysFixed #37257, Refs #35738 -- Prevented double-dot deprecation warnings for ↵Adam Johnson
template literals. The deprecation warning for double-dot variable lookups checked str(filter_expression.var), which for constants is the resolved literal value rather than a variable lookup. Templates containing string or translated string literals with two consecutive dots, such as {{ "a..b" }} or {{ 'a..b'|upper }}, therefore incorrectly raised a RemovedInDjango70Warning. The check now only applies when the filter expression's variable is a Variable lookup. Regression in 5d911f2d2fecc703be91b2b9b28acc59d34b35f3.
7 daysFixed #29969 -- Omitted inlines without add permission on save-as-new.Jakob Friedrich
7 daysFixed #37224 -- Skipped questioner for field changes on unmanaged models.Vishy
8 daysFixed #37205 -- Asserted exact HttpResponse types in tests.Jonathan Biemond
assertIsInstance passes when the expected is a superclass of the returned object. Thanks James Bligh for the review!
8 daysFixed #37239 -- Cleared stale db_default when pk comes from related object.Jacob Walls
8 daysRefs #36735 -- Added DatabaseFeatures.supports_uuid4_function_in_default ↵Jacob Walls
feature flag. Oracle 23.9 supported UUID() in SELECT contexts, but use in column defaults fails until 23.26.2.0 with: django.db.utils.DatabaseError: ORA-04044: procedure, function, package, or type is not allowed here
9 daysFixed CVE-2026-15920 -- Made display_for_field() validate URLs before ↵Natalia
rendering admin links. The admin renders URLField values as clickable links on changelists and read-only change forms. The link was built without validating the URL, so a potentially dangerous stored value could be rendered as a link that runs script in a staff member's authenticated session when clicked. The admin renders URLField values as clickable links on changelists and read-only change forms. The link was built without validating the URL, so a stored value using a potentially dangerous value was rendered as a link, which could lead to cross-site scripting in an authenticated admin session. Refs CVE-2019-12308, #36032. Thanks to Egor Saltykov for the report, and Sarah Boyce for reviews.
9 daysFixed CVE-2026-15830 -- Mitigated potential DoS via nested geometry collections.Jacob Walls
Since deeply nested geometry collections can lead to fatal errors in GEOS, a new `max_geom_collections` argument on geometry model and form fields, passed down to `GEOSGeometry` itself, allows limiting either depth (WKT) or total number (WKB) before reaching GEOS. Thanks Andrew MacPherson and kimchunbok_ for the reports, and Natalia Bidart, Simon Charette, and Sarah Boyce for reviews.
9 daysFixed CVE-2026-15337 -- Mitigated potential DoS in check_for_language().Natalia
Language codes longer than 500 characters are now rejected before the cached lookup, so they are no longer retained as cache keys consuming memory from each process. Thanks Jaeyoung Jang for the report, and Sarah Boyce for reviews.
9 daysFixed CVE-2026-15307 -- Blocked raster strings and dicts in spatial lookups.Jacob Walls
Spatial lookups optimistically parse values as rasters before retrying as geometries. If a malicious value reached the GDALRaster constructor, depending on the raster driver, it might write to disk or fetch from the network regardless of the constructor's `write=False` default argument. Although this works as designed for model field assignment, this is potentially unexpected for querying, for example, in the admin's changelist view, which allows staff users to execute arbitrary lookups on models registered with the admin. Network rasters didn't even work in lookup contexts before, providing further evidence that this use case was unintentional. (The failure point was after the fetching, however.) Now, strings and dicts representing rasters are rejected by spatial lookups. To opt in to using them, wrap them in a `GDALRaster` first. Although it would simplify the implementation to try geometries before rasters (instead of stashing a raster exception and raising it later), we maintain the current order, which has been stable for a decade. Thanks Bence Nagy, localhost-detect, and kimchunbok_ for providing information useful in evaluating this report. Thanks Simon Charette, Natalia Bidart, and Sarah Boyce for reviews.
9 daysAdded free-threaded Python 3.14t to PostGIS CI workflow.David Smith
9 daysRefs #28586 -- Renamed RAISE fetch mode to FETCH_RAISE.Jacob Walls
This aims for consistency in the django.db.models namespace. Thanks Natalia Bidart and Simon Charette for the idea.
9 daysFixed #36770 -- Fixed incomplete mocking in SQLiteInMemoryTestDbs.Jacob Walls
Without also mocking the global settings, there was pollution of the test database name, since create_test_db() writes like so: self.connection.settings_dict["NAME"] = test_database_name This caused other tests that explicitly reopen database connections to fail under parallel test execution (in forkserver mode) because at the moment of reopening, the db name was `memorydb_default` rather than the suffixed version `memorydb_default_3`: backends.sqlite.tests.ThreadSharing.test_database_sharing_in_threads servers.tests.LiveServerInMemoryDatabaseLockTest.test_in_memory_database_lock
10 daysFixed #37242 -- Fixed reading null time fields in LayerMapping.Jacob Walls
Follow-up to 75d627888bf42f8de6064a0bd665c98c0df66c55.
12 daysFixed #36626 -- Preserved milliseconds in DataSource time fields.Francesco Bruni
12 daysFixed #37236 -- Allowed altering spatial indexes on RasterField.Mariano Baragiola
12 daysFixed #27734 -- Made parallel test workers reuse database clones of exited ↵Ahmed Mohamed
workers. This prevents newly spawned workers from attempting to access nonexistent clones. Thanks James Bligh for the review.
13 daysFixed #37238 -- Prevented fallback to python default for a pk with a db_default.Jacob Walls
Regression in a2348c85fc6c20087935c74cd99340dd4ef2dcdc.
13 daysFixed #37240 -- Fixed simplify_regex() with multiple unnamed groups.SEPURI-SAI-KRISHNA
13 daysUpdated asgiref dependency in free-threaded requirements.Jacob Walls
Follow-up to 0bba6363b0ecf3426defbdada17c5efbd51a77c8.
2026-07-29Refs #12227 -- Added test for PREPEND_WWW redirect following in test client.anurag629
2026-07-29Refs #28586 -- Added coverage for from_queryset's fetch mode in ↵Jacob Walls
refresh_from_db().
2026-07-29Fixed #37234 -- Fixed bulk_create() for late-saved related primary keys.Filip Sedlák
Objects with a primary key supplied by a late-saved related instance were partitioned before their related fields were prepared. This caused an assertion failure on backends returning rows from bulk inserts. Regression in 7d9aab8da0a06787d649762a702e1a518d843a63.
2026-07-29Fixed #27752 -- Fixed ordering by Model.__str__ in the admin.VIZZARD-X
Co-authored-by: blighj <blighj@users.noreply.github.com>
2026-07-29Fixed #37233 -- Prevented sort controls for unordered __str__ admin columns.Akshat Sparsh
2026-07-28Fixed #37230 -- Fixed a crash for second-degree relations in ↵Zubair Hassan
ModelAdmin.list_display. Thanks Rob Kuipers for the report. Regression in 4b2b4bf0ac2707dc9c4d51cabfa72168eaea95fe. Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
2026-07-27Refs #22712 -- Restored django.contrib.staticfiles.finders.BaseFinder.find().Nick Pope
This was overzealously removed in a146fe293099d7f860ba13e4b3a571bbda55af22.
2026-07-27Fixed #37198 -- Fixed content_disposition_header() quoting of filenames ↵Vishy
ending with newlines.
2026-07-24Fixed #37160 -- Made admin views raise PermissionDenied consistently.Natalia
The admin view_on_site and history views now return an HTTP 403 response when a staff user lacks view or change permission for the target model, consistent with the changeform and autocomplete views. Thanks Bence Nagy for the report.
2026-07-24Fixed minor typos and grammatical errors in docs and docstrings.Jacob Walls
Thanks to these people for pointing these out: * Hojeong Park * Natalia Bidart * Sulav Raj Bista
2026-07-23Refs #36694 -- Skipped GIS test needing spatial index on Oracle.Jacob Walls
2026-07-23Fixed #36027 -- Made error response rendering thread-sensitive.Carlton Gibson
Error response handling frequently makes use of the database, and so must use the request specific connection sensitive worker thread. Previously response_for_exception was dispatched on the event loop's default executor. This potentially leads to pool exhaustion, and deadlock, when using database pooling option, or a large number of permanently held open database connections when not using pooling. Connections held open were not subject to cleanup. If closed server side, the reported "connection is closed" would be seen until application restart. Moving error response rendering to the request specific connection sensitive worker thread resolves both of these issues. The `thread_sensitive=False` was set in e17ee4468875077b90b70bb6a589ebad7493f757 to maintain the prior behaviour when asgiref switched the thread_sensitive default to `True`. There was no specific reason for the non-tread-sensitive behaviour beyond that. (With hindsight it was always incorrect for the reasons here.)
2026-07-23Fixed #37203 -- Used normalized field names for composite pks in inspectdb.mundur
2026-07-23Refs #37203 -- Escaped introspection error comments in inspectdb.mundur
2026-07-20Fixed #36694 -- Restored missing Index options in ↵Clifford Gama
PostGISSchemaEditor._create_spatial_index_sql(). Thanks Luciano de la Iglesia for the report, and Simon Charette and David Smith for the reviews.
2026-07-20Refs #32539 -- Fixed flaky facet filter tests.Jacob Walls
Because the default admin site was used, UserAdmin was never registered, meaning the username ordering was never applied.
2026-07-16Fixed #32915 -- Suppressed fewer ImportErrors in management commands.Ben Cail
Before, exceptions during settings loading were swallowed by management commands. Now, if the new command attribute settings_required is True (default), the error will be printed to stderr, and the command will exit non-zero. makemessages, runserver, shell, and startproject continue to tolerate missing settings (via settings_required=False). Regression in c6864a01b25591d3a709da8071413b69c9e35341, which added support for some commands (e.g. startproject) to cope with missing settings. Thanks Mariusz Felisiak, Sarah Boyce, Jacob Walls, Mike Edmunds, and Brian Helba for reviews. Co-authored-by: Rohith PR <praroh2@gmail.com>
2026-07-15Refs #36983 -- Fixed race condition in ExceptionReporterTests under ↵Carlton Gibson
free-threading.
2026-07-15Refs #36983 -- Added CI tests on free-threaded Python 3.13t and 3.14t.Carlton Gibson
2026-07-15Updated asgiref dependency.Carlton Gibson
2026-07-14Closed temporary files in GDALRasterTests.Jacob Walls
2026-07-14Fixed #37210 -- Logged cached_db session cache delete failures.vismaytiwari
2026-07-14Fixed #25243 -- Added inspectdb regression test for sqlite_schema FK.dcsid
2026-07-13Fixed #37187, #37190 -- Pointed ModelAdmin warnings to the deprecated code.Mike Edmunds
Used warn_about_implementation() for ModelAdmin deprecation warnings on get_list_select_related() return value and missing action_location parameters in get_actions() and get_action_choices(). Fixes a problem where the warnings would point to wsgiref rather than the ModelAdmin subclass using deprecated functionality.
2026-07-13Refs #37187 -- Implemented warn_about_implementation() deprecation utility.Mike Edmunds
Created warn_about_implementation() for issuing warnings about particular code that isn't currently on the call stack.
2026-07-13Fixed #37178 -- Moved MiddlewareMixin out of utils.deprecation.CharulL00
2026-07-13Fixed #29303 -- Avoided mutating original view in non_atomic_requests().Sina Chaichi Maleki
Previously non_atomic_requests() mutated the _non_atomic_requests attribute of the original view function instead of returning a new wrapper.
2026-07-10Fixed #36864 -- Supported modules and submodules in import_string().Leland
Before, only submodules worked (and only if already imported). Now, all modules work regardless of prior import state. Updated expected exception in auth tests where import_string() returns a non-callable.
2026-07-10Fixed #37181 -- Corrected assertion in SeleniumTests.test_pagination.Varun Kasyap
2026-07-10Fixed #37182 -- Corrected property typo in skip link to content test.Varun Kasyap