summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-07-26Added missing skips in constraint tests.Tim Graham
2024-07-25Added dedicated test for invalid inputs in floatformat template filter tests.nessita
Co-authored-by: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com>
2024-07-25Fixed #35627 -- Raised a LookupError rather than an unhandled ValueError in ↵Lorenzo Peña
get_supported_language_variant(). LocaleMiddleware didn't handle the ValueError raised by get_supported_language_variant() when language codes were over 500 characters. Regression in 9e9792228a6bb5d6402a5d645bc3be4cf364aefb.
2024-07-25Added contributor guidelines for performance optimizations.Sarah Boyce
2024-07-25Fixed #35331 -- Updated dropdown lists with entries added via the '+' sign ↵Devin Cox
from M2M field.
2024-07-25Fixed #35625 -- Fixed a crash when adding a field with db_default and check ↵Simon Charette
constraint. This is the exact same issue as refs #30408 but for creating a model with a constraint containing % escapes instead of column addition. All of these issues stem from a lack of SQL and parameters separation from the BaseConstraint DDL generating methods preventing them from being mixed with other parts of the schema alteration logic that do make use of parametrization on some backends (e.g. Postgres, MySQL for DEFAULT). Prior to the addition of Field.db_default and GeneratedField in 5.0 parametrization of DDL was never exercised on model creation so this is effectively a bug with db_default as the GeneratedField case was addressed by refs #35336. Thanks Julien Chaumont for the report and Mariusz Felisiak for the review.
2024-07-24Fixed #35604, Refs #35326 -- Made FileSystemStorage.exists() behaviour ↵Sarah Boyce
independent from allow_overwrite. Partially reverts 0b33a3abc2ca7d68a24f6d0772bc2b9fa603744e. Storage.exists(name) was documented to "return False if the name is available for a new file." but return True if the file exists. This is ambiguous in the overwrite file case. It will now always return whether the file exists. Thank you to Natalia Bidart and Josh Schneier for the review.
2024-07-24Fixed #35541 -- Fixed paginator border in admin CSS.arjunomray
2024-07-24Updated asgiref dependency for 5.1 release series.Mariusz Felisiak
2024-07-24Bumped versions in pre-commit and npm configurations.Mariusz Felisiak
2024-07-23Refs #29049 -- Fixed isolation of ↵Mariusz Felisiak
BasicExpressionsTests._test_slicing_of_f_expressions() subtests. Thanks Tim Graham for the report.
2024-07-23Fixed #35585 -- Corrected Query.exists() call in Query.has_results().Flavio Curella
2024-07-23Updated example links in urlize docs.Matthew Somerville
goo.gl links are being removed in 2025: https://developers.googleblog.com/en/google-url-shortener-links-will-no-longer-be-available/
2024-07-22Refs #10941 -- Reorganized querystring template tag docs.nessita
2024-07-22Cleaned up temporary test directories in tests.Mariusz Felisiak
2024-07-22Applied optimizations to template.utils.get_app_template_dirs().sobolevn
2024-07-22Fixed typo in django/test/testcases.py docstring.Jacob Walls
2024-07-22Fixed #35614 -- Prevented SQLCompiler.as_subquery_condition() from mutating ↵Bendeguz Csirmaz
a query.
2024-07-22Fixed broken link in django.core.files.temp docstring.Ellen
2024-07-22Fixed typos in Atomic docstring.Muhammad N. Fadhil
2024-07-19Fixed #35559 -- Avoided unnecessary query on sliced union of empty queries.Simon Charette
While refs #34125 focused on the SQL correctness of slicing of union of potentially empty queries it missed an optimization opportunity to avoid performing a query at all when all queries are empty. Thanks Lucidiot for the report.
2024-07-18Fixed #35603 -- Prevented F.__contains__() from hanging.Simon Charette
Regression in 94b6f101f7dc363a8e71593570b17527dbb9f77f.
2024-07-18Fixed #35606, Refs #34045 -- Fixed rendering of ModelAdmin.action_checkbox ↵Hisham Mahmood
for models with a __html__ method. Thank you Claude Paroz for the report. Regression in 85366fbca723c9b37d0ac9db1d44e3f1cb188db2.
2024-07-17Refs #34701 -- Moved UniqueConstraint(nulls_distinct) validation tests.Simon Charette
The original tests required the creation of a model that is no longer necessary and were exercising Model.full_clean(validate_constraints) which has nothing to do with the nulls_distinct feature.
2024-07-17Fixed #35594 -- Added unique nulls distinct validation for expressions.Simon Charette
Thanks Mark Gensler for the report.
2024-07-17Refs #30581 -- Made unattached UniqueConstraint(fields) validation testable.Simon Charette
The logic allowing UniqueConstraint(fields).validate to preserve backward compatiblity with Model.unique_error_message failed to account for cases where the constraint might not be attached to a model which is a common pattern during testing. This changes allows for arbitrary UniqueConstraint(fields) to be tested in isolation without requiring actual models backing them up. Co-authored-by: Mark G <mark.gensler@protonmail.com>
2024-07-16Refs #10941 -- Renamed test file test_query_string.py to test_querystring.py.nessita
This follows previous renames made in 27043bde5b795eb4a605aeca1d3bc4345d2ca478.
2024-07-16Doc'd purpose of tuple() in SQLCompiler.get_from_clause().Tim Graham
It was added in 01d440fa1e6b5c62acfa8b3fde43dfa1505f93c6 to prevent "RuntimeError: OrderedDict mutated during iteration". That particular issue was fixed in d660cee5bc68b597503c2a16f3d9928d52f93fb4 but the issue could remain in Join.as_sql() subclasses. Co-authored-by: Simon Charette <charette.s@gmail.com>
2024-07-15Removed leftover KeyError handling after Query.tables attribute cleanup.nessita
Follow up from f7f5edd50d03e8482f8a6da5fb5202b895d68cd6.
2024-07-15Refs #10941 -- Renamed query_string template tag to querystring.Sarah Boyce
2024-07-15Refs #35464 -- Added test to cover layout of TabularInline fieldsets.Maryam Yusuf
2024-07-15Fixed #35464 -- Updated docs to note fieldsets have limited impact on ↵Maryam Yusuf
TabularInlines.
2024-07-15Removed duplicate inline from tests.admin_inlines.admin.PhotographerAdmin.Sarah Boyce
2024-07-15Refs #35560 -- Corrected required feature flags in ↵Mariusz Felisiak
GeneratedModelUniqueConstraint.
2024-07-12Refs #35506 -- Reverted "global URLconf" to "root URLconf" in tutorial 1.Tim Graham
2024-07-11Refs #25466 -- Removed unused DeprecationInstanceCheck.Adam Johnson
Unused since ff419de263138e905dff44c5cb806310c70f32aa.
2024-07-11Optimized Case.as_sql() default compilation.Tim Graham
Moving compiler.compile(self.default) to the else clause avoids the call when it's unneeded in the FullResultSet case.
2024-07-11Fixed syntax of CSS file used in tests.Tom Carrick
2024-07-11Fixed #35033, Refs #28912 -- Fixed repeated headers in EmailMessage.Mike Edmunds
Fixed a regression which would cause multiple To, Cc, and Reply-To headers in the result of EmailMessage.message() if values were supplied for both to/cc/reply_to and the corresponding extra_headers fields. Updated related tests to check the generated message() has exactly one of each expected header using get_all(). Regression in b03d5002955256c4b3ed7cfae5150eb79c0eb97e.
2024-07-10Improved test coverage of urlize.Sarah Boyce
2024-07-10Fixed #35424 -- Checked order_with_respect_to is available when migrating ↵Daniel Patrick
_order fields. Migrations would crash following the removal of an order_with_respect_to field from a model and the addition of an _order field.
2024-07-09Added CVE-2024-38875, CVE-2024-39329, CVE-2024-39330, and CVE-2024-39614 to ↵Natalia
security archive.
2024-07-09Added stub release notes for 5.0.8.Natalia
2024-07-09Made cosmetic edits to 5.0.7 release notes.Natalia
2024-07-09Fixed CVE-2024-39614 -- Mitigated potential DoS in ↵Sarah Boyce
get_supported_language_variant(). Language codes are now parsed with a maximum length limit of 500 chars. Thanks to MProgrammer for the report.
2024-07-09Fixed CVE-2024-39330 -- Added extra file name validation in Storage's save ↵Natalia
method. Thanks to Josh Schneier for the report, and to Carlton Gibson and Sarah Boyce for the reviews.
2024-07-09Fixed CVE-2024-39329 -- Standarized timing of verify_password() when ↵Michael Manfre
checking unusuable passwords. Refs #20760. Thanks Michael Manfre for the fix and to Adam Johnson for the review.
2024-07-09Fixed CVE-2024-38875 -- Mitigated potential DoS in urlize and urlizetrunc ↵Adam Johnson
template filters. Thank you to Elias Myllymäki for the report. Co-authored-by: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com>
2024-07-09Fixed #35580 -- Allowed related fields referencing auto-created through models.jason_bruce
2024-07-09Fixed #35413 -- Made unsupported lookup error message more specific.wookkl