summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2025-09-15Fixed #36589 -- Made assertTemplateUsed/NotUsed track full path for ↵Caitie Baca
PartialTemplate. Previously, assertTemplateUsed only matched partial names, ignoring the template origin. This caused assertions on partials specified by origin ("template.html#partial") to fail. Refs #36410.
2025-09-15Refs #27489 -- Made RenamePermission() operation respect database.David Sanders
Regression in f02b49d2f3bf84f5225de920ca510149f1f9f1da. Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2025-09-14Fixed #27222 -- Refreshed model field values assigned expressions on save().Simon Charette
Removed the can_return_columns_from_insert skip gates on existing field_defaults tests to confirm the expected number of queries are performed and that returning field overrides are respected.
2025-09-14Refs #27222 -- Refreshed GeneratedFields values on save() initiated update.Simon Charette
This required implementing UPDATE RETURNING machinery that heavily borrows from the INSERT one.
2025-09-12Refs #35667 -- Cached Django file prefixes for warnings.Adam Johnson
2025-09-11Fixed #36603 -- Optimized check order in LoginRequiredMiddleware.Adam Johnson
2025-09-05Fixed #36564 -- Changed DEFAULT_AUTO_FIELD from AutoField to BigAutoField.Tim Graham
2025-09-04Fixed #36481 -- Fixed QuerySet.update concrete fields check.Ryan P Kilby
FieldError is now emitted for invalid update calls involving reverse relations, where previously they failed with AttributeError.
2025-09-04Refs #36481 -- Improved test coverage for invalid updates on reverse relations.Ryan P Kilby
2025-09-04Refs #36559, #35667 -- Used skip_file_prefixes in PartialTemplate.source ↵farhan
warning.
2025-09-03Refs #34989 -- Ensured the Content-Length header is set when redirect with ↵Ronan LE HAY
APPEND_SLASH.
2025-09-03Fixed #36559 -- Respected verbatim and comment blocks in PartialTemplate.source.farhan
2025-09-03Refs #36559 -- Ran template partial source tests in debug mode only.farhan
Added a warning for accessing PartialTemplate.source when debugging is disabled. Thanks Sarah Boyce for the idea.
2025-09-03Fixed CVE-2025-57833 -- Protected FilteredRelation against SQL injection in ↵Jake Howard
column aliases. Thanks Eyal Gabay (EyalSec) for the report.
2025-08-29Fixed #36431 -- Returned tuples for multi-column ForeignObject in ↵SaJH
values()/values_list(). Thanks Jacob Walls and Simon Charette for tests. Signed-off-by: SaJH <wogur981208@gmail.com>
2025-08-29Refs #36152 -- Suppressed duplicate warning when using "%" in alias via ↵Jacob Walls
values().
2025-08-29Fixed #34624 -- Removed change, delete, and view buttons for non-Select ↵SaJH
widgets in RelatedFieldWidgetWrapper. Signed-off-by: SaJH <wogur981208@gmail.com>
2025-08-28Fixed #36532 -- Added Content Security Policy view decorators to override or ↵Rob Hudson
disable policies. Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
2025-08-28Refs #36520 -- Ensured only the header value is passed to ↵Jake Howard
parse_header_parameters for multipart requests. Header parsing should apply only to the header value. The previous implementation happened to work but relied on unintended behavior.
2025-08-28Fixed #35533 -- Prevented urlize creating broken links given a markdown link ↵SaJH
input. Signed-off-by: SaJH <wogur981208@gmail.com>
2025-08-27Fixed incorrect IDs in test_in_bulk_preserve_ordering.Tim Graham
2025-08-27Fixed #36572 -- Revert "Fixed #36546 -- Deprecated ↵Sarah Boyce
django.utils.crypto.constant_time_compare() in favor of hmac.compare_digest()." This reverts commit 0246f478882c26bc1fe293224653074cd46a90d0.
2025-08-26Refs #15727 -- Captured failed request log in CSPMiddlewareTest.Jacob Walls
2025-08-26Fixed #36556 -- Fixed TabularInline width overflowing the page.antoliny0919
2025-08-25Fixed #36546 -- Deprecated django.utils.crypto.constant_time_compare() in ↵SaJH
favor of hmac.compare_digest(). Signed-off-by: SaJH <wogur981208@gmail.com>
2025-08-25Fixed #36251 -- Avoided mutating form Meta.fields in BaseInlineFormSet.SaJH
Signed-off-by: SaJH <wogur981208@gmail.com>
2025-08-22Refs #35530 -- Corrected deprecation message in auth.alogin().Mariusz Felisiak
Follow up to ceecd518b19044181a3598c55ebed7c2545963cc.
2025-08-21Fixed failing bulk_create test raising IntegrityError when run in reverse.Natalia
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-21Refs #36366 -- Fixed page number layout in admin pagination on small screens.antoliny0919
Regression in 3f59711581bd22ebd0f13fb040b15b69c0eee21f.
2025-08-21Fixed #36399 -- Added support for multiple Cookie headers in HTTP/2 for ↵SaJH
ASGIRequest. Signed-off-by: SaJH <wogur981208@gmail.com>
2025-08-21Fixed #36560 -- Prevented UpdateCacheMiddleware from caching responses with ↵mengxun
Cache-Control 'no-cache' or 'no-store'.
2025-08-21Refs #36430, #36416, #34378 -- Simplified batch size calculation in ↵Jacob Walls
QuerySet.in_bulk().
2025-08-21Fixed #36430 -- Removed artificially low limit on single field bulk ↵Jacob Walls
operations on SQLite.
2025-08-21Fixed #36382 -- Confirmed support for GDAL 3.11.David Smith
TIGER driver was removed in GDAL 3.11. https://github.com/OSGeo/gdal/commit/eb793be0395ccba50e053a46b30cb90deb530990
2025-08-20Fixed #36561 -- Used request.auser() in ↵Xinyi Rong
contrib.auth.aupdate_session_auth_hash().
2025-08-19Fixed #27489 -- Renamed permissions upon model renaming in migrations.Artyom Kotovskiy
2025-08-19Fixed #35892 -- Supported Widget.use_fieldset in admin forms.antoliny0919
2025-08-15Avoided usage of DEBUG setting override in bulk_create tests.Simon Charette
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-15Fixed #36490 -- Avoided unnecessary transaction in bulk_create.Simon Charette
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-14Fixed #36410 -- Added support for Template Partials to the Django Template ↵farhan
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-12Fixed #36499 -- Adjusted utils_tests.test_html.TestUtilsHtml.test_strip_tags ↵Natalia
following Python's HTMLParser new behavior. Python fixed a quadratic complexity processing for HTMLParser in: https://github.com/python/cpython/commit/6eb6c5db.
2025-08-12Fixed test_utils.tests.HTMLEqualTests.test_parsing_errors following Python's ↵Natalia
HTMLParser fixed parsing. Further details about Python changes can be found in: https://github.com/python/cpython/commit/0243f97cbadec8d985e63b1daec5d1cbc850cae3. Thank you Clifford Gama for the thorough review!
2025-08-12Fixed #36368 -- Prevented duplicate locale paths and write_po_file calls in ↵michalpokusa
makemessages.
2025-08-08Fixed #36525 -- Silenced individual deleted file messages in collectstatic ↵James Bligh
--clear's default verbosity.
2025-08-08Fixed #36540 -- Updated request.auser() in contrib.auth.alogin() and ↵Xinyi Rong
contrib.auth.alogout().
2025-08-07Fixed #36210, Refs #36181 -- Allowed Subquery usage in further lookups ↵Jacob Walls
against composite pks. Follow-up to 8561100425876bde3be4b2a22324655f74ff9609. Co-authored-by: Simon Charette <charette.s@gmail.com>
2025-08-07Refs #36210 -- Added missing limits in Subquery tests.Jacob Walls
2025-08-05Fixed #26583 -- Silenced individual clashing name warnings in ↵James Bligh
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-05Fixed #36079 -- Fixed text size of TabularInline object titles.antoliny0919
2025-08-05Fixed #36537 -- Ensured unique HTML IDs for geometry widget option scripts ↵Matthias Kestenholz
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>