summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2024-06-26[5.1.x] Fixed #35561 -- Made *args and **kwargs parsing more strict in ↵nessita
Model.save()/asave(). Backport of e56a32b89bb7fadffdfaa2cdf12b4863ccd5af9b from main.
2024-06-25[5.1.x] Fixed #35558 -- Increased inline H3 headers color prominence in ↵Sarah Boyce
admin change page. Backport of e510bb1ab1fb22837c169e0459b81cf388b6d8d2 from main.
2024-06-25[5.1.x] Fixed #35554, Refs #35060 -- Corrected deprecated *args parsing in ↵Adam Johnson
Model.save()/asave(). The transitional logic added to deprecate the usage of *args for Model.save()/asave() introduced two issues that this branch fixes: * Passing extra positional arguments no longer raised TypeError. * Passing a positional but empty update_fields would save all fields. Co-authored-by: Natalia <124304+nessita@users.noreply.github.com> Backport of 28522c3c8d5eb581347aececc3ac61c134528114 from main.
2024-06-25[5.1.x] Refs #35059 -- Used asyncio.Event in ↵Carlton Gibson
ASGITest.test_asyncio_cancel_error to enforce specific interleaving. Sleep call leads to a hard to trace error in CI. Using an Event is more deterministic, and should be less prone to environment variations. Bug in 11393ab1316f973c5fbb534305750740d909b4e4. Backport of f4a08b6ddfcacadfe9ff8364bf1c6c54f5dd370f from main.
2024-06-24[5.1.x] Fixed #35545, Refs #32833 -- Fixed ↵Sarah Boyce
ContentTypeManager.get_for_models() crash in CreateModel migrations. Thank you to Csirmaz Bendegúz for the report and Simon Charettes for the review. Backport of f1705c8780c0a7587654fc736542d55fe4a7f29b from main.
2024-06-20[5.1.x] Simplified OperationTestCase.alter_gis_model() test hook a bit.Mariusz Felisiak
This avoids passing "blank=False" and "srid=4326" to field classes, which are the default values, and removes special treatment for the "blank" parameter. Backport of a0c44d4e23f8f509757f97f28fbbb1ced3382361 from main.
2024-06-20[5.1.x] Refs #35074 -- Avoided failed attempts to remove spatial indexes on ↵Mariusz Felisiak
nullable fields on MySQL. MySQL doesn't support spatial indexes on NULL columns, so there is no point in removing them. Backport of 20c2d625d3d5062e43918d1d7b6f623202491dd4 from main.
2024-06-17[5.1.x] Fixed #35483 -- Added NUL (0x00) character validation to ↵Alexander Lötvall
ModelChoiceFields. Applied the ProhibitNullCharactersValidator to ModelChoiceField and ModelMultipleChoiceField. Co-authored-by: Viktor Paripás <viktor.paripas@gmail.com> Co-authored-by: Vasyl Dizhak <vasyl@dizhak.com> Co-authored-by: Arthur Vasconcelos <vasconcelos.arthur@gmail.com> Backport of 38ad710aba885ad26944ff5708ce1a02a446d2d3 from main.
2024-06-14[5.1.x] Refs #34881 -- Fixed ↵Mariusz Felisiak
OperationTests.test_rename_m2m_field_with_2_references() test on Oracle. Backport of fa7848146738a9fe1d415ee4808664e54739eeb7 from main.
2024-06-14[5.1.x] Fixed mail.tests.MailTests.test_backend_arg() test on Python 3.13+.Mariusz Felisiak
There is no point in asserting Python error messages. Backport of 4ee68bb4f50dbe842461f8f340bb1633fddd4a53 from main.
2024-06-14[5.1.x] Fixed #34881 -- Fixed a crash when renaming a model with multiple ↵Anže Pečar
ManyToManyField.through references on SQLite. Thank you to dennisvang for the report and Jase Hackman for the test. Co-authored-by: Jase Hackman <jase.hackman@zapier.com> Backport of e99187e5c94516ee35f37cc41a36d906b395808d from main.
2024-06-14[5.1.x] Fixed #35488 -- Fixed BaseModelFormSet.validate_unique() crash due ↵Madalin Popa
to unhashable type. Backport of d28626ecf8bd340084ed70ff2d88e8dbab001e2c from main.
2024-06-14[5.1.x] Fixed #35417 -- Updated BaseContext.new() with values to create a ↵George Y. Kussumoto
context that can be flattened. Backport of 2a32b233822683c51e59722b7c9aa0789fc4ab1b from main.
2024-06-14[5.1.x] Fixed #34789 -- Prevented updateRelatedSelectsOptions fromDevin Cox
adding entries to filter_horizontal chosen box. Co-authored-by: yokeshwaran1 <yokesh440@yahoo.com> Backport of 719a42b589d7551fc84708044b9e984ce723c8a2 from main.
2024-06-14[5.1.x] Fixed #35469 -- Removed deferred SQL to create index removed by ↵Jacob Walls
AlterField operation. Backport of 99f23eaabd8da653f046dc1d19f5008c030a4f79 from main.
2024-06-14[5.1.x] Fixed #35443 -- Changed ordinal to return negative numbers unchanged.Simon Törnqvist
Previously, `-1` was converted to `"-1th"`. This has been updated to return negative numbers "as is", so that for example `-1` is converted to `"-1"`. This is now explicit in the docs. Co-authored-by: Martin Jonson <artin.onson@gmail.com> Backport of d3a7ed5bcc45000a6c3dd55d85a4caaa83299f83 from main.
2024-05-30[5.1.x] Fixed #35477 -- Corrected 'required' errors in auth password ↵Fabian Braun
set/change forms. The auth forms using SetPasswordMixin were incorrectly including the 'This field is required.' error when additional validations (e.g., overriding `clean_password1`) were performed and failed. This fix ensures accurate error reporting for password fields. Co-authored-by: Natalia <124304+nessita@users.noreply.github.com> Backport of 339977d4441fd353e20950b98bad3d42afb1f126 from main.
2024-05-22[5.1.x] Fixed #35472 -- Used temporary directory in test_imagefield.NoReadTests.Sarah Boyce
Backport of 7e39ae5c8cf4c6601a4f47b72914349481c5331b from main.
2024-05-22Fixed #35393 -- Added excluded pk as a hidden field to the inline admin.Willem Van Onsem
2024-05-22Fixed #31405 -- Added LoginRequiredMiddleware.Hisham Mahmood
Co-authored-by: Adam Johnson <me@adamj.eu> Co-authored-by: Mehmet İnce <mehmet@mehmetince.net> Co-authored-by: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com>
2024-05-22Fixed #35189 -- Improved admin collapsible fieldsets by using <details> ↵Marijke Luttekes
elements. This work improves the accessibility of the add and change pages in the admin site by adding <details> and <summary> elements to the collapsible fieldsets. This has the nice side effect of no longer requiring custom JavaScript helpers to implement the fieldsets' show/hide capabilities. Thanks to James Scholes for the accessibility advice, and to Sarah Boyce and Tom Carrick for reviews. Co-authored-by: Natalia <124304+nessita@users.noreply.github.com> Co-authored-by: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com>
2024-05-22Refs #35189 -- Improved admin fieldset's accessibility by setting ↵Marijke Luttekes
aria-labelledby. Before this change, HTML <fieldset> elements in the admin site did not have an associated label to describe them. This commit defines a unique HTML id for the heading labeling a fieldset, and sets its aria-labelledby property to link the heading with the fieldset.
2024-05-22Fixed #35139 -- Prevented file read after ImageField is saved to storage.John Parton
2024-05-21Fixed #18119 -- Added a DomainNameValidator validator.Berker Peksag
Thanks Claude Paroz for the review. Co-authored-by: Nina Menezes <77671865+nmenezes0@users.noreply.github.com>
2024-05-21Fixed #35405 -- Converted get_cache_name into a cached property in ↵Adam Johnson
FieldCacheMixin. FieldCacheMixin is used by related fields to track their cached values. This work migrates get_cache_name() to be a cached property to optimize performance by reducing unnecessary function calls when working with related fields, given that its value remains constant. Co-authored-by: Simon Charette <charette.s@gmail.com> Co-authored-by: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com> Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
2024-05-21Removed hardcoded docs version in csrf template.Ryan Hiebert
2024-05-21Fixed #35326 -- Added allow_overwrite parameter to FileSystemStorage.Ben Cail
2024-05-17Fixed #35428 -- Increased parallelism of the ScryptPasswordHasher.SaJH
2024-05-16Fixed typos in test docstrings.Mariusz Felisiak
2024-05-15Fixed #35384 -- Raised FieldError when saving a file without a name to ↵Jonny Park
FileField.
2024-05-14Fixed #29942 -- Restored source file linking in docs by using the Sphinx ↵Joachim Jablon
linkcode ext. Co-authored-by: David Smith <smithdc@gmail.com> Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
2024-05-14Fixed #35275 -- Fixed Meta.constraints validation crash on UniqueConstraint ↵Mariusz Felisiak
with OpClass(). This also introduces Expression.constraint_validation_compatible that allows specifying that expression should be ignored during a constraint validation.
2024-05-13Fixed #35408 -- Optimized post-migrate permission creation.Adam Johnson
co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2024-05-10Added tests for Storage's generate_filename method.nessita
2024-05-10Fixed #35429 -- Added argparse choices to --database options.SaJH
2024-05-10Fixed #35436 -- Fixed displaying Unicode chars in forms.HStoreField.SaJH
2024-05-07Fixed #35407 -- Cached model's Options.swapped.Adam Johnson
2024-05-07Fixed #35425 -- Avoided INSERT with force_update and explicit pk.Jacob Walls
Affected models where the primary key field is defined with a default or db_default, such as UUIDField.
2024-05-04Fixed #35426 -- Updated querysets to be a required argument of GenericPrefetch.sobolevn
2024-05-03Fixed #35422 -- Fixed migrations crash when altering GeneratedField ↵Mariusz Felisiak
referencing rename field. Thanks Sarah Boyce for the report and Simon Charette for the implementation idea.
2024-05-02Fixed #35359 -- Fixed migration operations ordering when adding fields ↵DevilsAutumn
referenced by GeneratedField.expression. Thank you to Simon Charette for the review.
2024-05-02Refs #34007, Refs #35359 -- Added Q.referenced_based_fields property.David Sanders
Thank you to Mariusz Felisiak and Natalia Bidart for the reviews.
2024-05-02Added a high contrast mode to screenshot cases.Sarah Boyce
Thank you to Sarah Abderemane and Nick Pope for the reviews.
2024-04-30Refs #32819 -- Avoided adding 'aria-describedby' to hidden inputs.David Smith
Hidden elements are not visible for both accessibility tools and browsers presentation layer. This change therefore only reduces the size of the generated HTML.
2024-04-29Fixed #35412 -- Dropped support for SQLite < 3.31.Mariusz Felisiak
2024-04-25Fixed #35339 -- Fixed PostgreSQL aggregate's filter and order_by params order.Chris Muthig
Updated OrderableAggMixin.as_sql() to separate the order_by parameters from the filter parameters. Previously, the parameters and SQL were calculated by the Aggregate parent class, resulting in a mixture of order_by and filter parameters. Thanks Simon Charette for the review.
2024-04-25Refs #35339 -- Updated Aggregate class to return consistent source expressions.Chris Muthig
Refactored the filter and order_by expressions in the Aggregate class to return a list of Expression (or None) values, ensuring that the list item is always available and represents the filter expression. For the PostgreSQL OrderableAggMixin, the returned list will always include the filter and the order_by value as the last two elements. Lastly, emtpy Q objects passed directly into aggregate objects using Aggregate.filter in admin facets are filtered out when resolving the expression to avoid errors in get_refs(). Thanks Simon Charette for the review.
2024-04-24Fixed #35395 -- slice filter crashes on an empty dict with Python 3.12.Tim Richardson
Keep consistent behaviour of slice() filter between python 3.12 and prior versions in the case of a dict passed to the filter (catch the new to python 3.12 KeyError exception).
2024-04-23Fixed #35356 -- Deferred self-referential foreign key fields adequately.Simon Charette
While refs #34612 surfaced issues with reverse one-to-one fields deferrals, it missed that switching to storing remote fields would break self-referential relationships. This change switches to storing related objects in the select mask instead of remote fields to prevent collisions when dealing with self-referential relationships that might have a different directional mask. Despite fixing #21204 introduced a crash under some self-referential deferral conditions, it was simply not working even before that as it aggregated the sets of deferred fields by model. Thanks Joshua van Besouw for the report and Mariusz Felisiak for the review.
2024-04-17Made SeleniumTests.test_inline_add_another_widgets less flaky by adding ↵Marijke Luttekes
explicit wait.