summaryrefslogtreecommitdiff
path: root/django
AgeCommit message (Collapse)Author
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-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-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-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 #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-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-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
2024-07-04Fixed #35560 -- Made Model.full_clean() ignore GeneratedFields for constraints.Mark Gensler
Accessing generated field values on unsaved models caused a crash when validating CheckConstraints and UniqueConstraints with expressions.
2024-07-04Fixed #35520 -- Avoided opening transaction for read-only ModelAdmin requests.Jake Howard
2024-07-04Fixed #35569 -- Improved wording of invalid ForeignKey error message.Jacob Walls
2024-07-04Removed unneeded hyphens in "counterintuitive".Carlton Gibson
Follow-up to 65ad4ade74dc9208b9d686a451cd6045df0c9c3a which added counterintuitive to the wordlist. Removes unneeded (antiquated) hyphenated usages. See e.g. https://www.merriam-webster.com/dictionary/counterintuitive
2024-07-03Refs #28900 -- Made Query.has_select_fields a computed property.Simon Charette
This should ensure it never drifts from Query.selected while maintaining backward compatibility.
2024-07-03Fixed #28900 -- Propagated all selected fields to combinator queries.Simon Charette
Previously, only the selected column aliases would be propagated and annotations were ignored.
2024-07-03Refs #28900 -- Made SELECT respect the order specified by values(*selected).Simon Charette
Previously the order was always extra_fields + model_fields + annotations with respective local ordering inferred from the insertion order of *selected. This commits introduces a new `Query.selected` propery that keeps tracks of the global select order as specified by on values assignment. This is crucial feature to allow the combination of queries mixing annotations and table references. It also allows the removal of the re-ordering shenanigans perform by ValuesListIterable in order to re-map the tuples returned from the database backend to the order specified by values_list() as they'll be in the right order at query compilation time. Refs #28553 as the initially reported issue that was only partially fixed for annotations by d6b6e5d0fd4e6b6d0183b4cf6e4bd4f9afc7bf67. Thanks Mariusz Felisiak and Sarah Boyce for review.
2024-06-28Refs #35561 -- Renamed Model.save()/asave() helper to a more specific name.nessita
2024-06-28Reverted "Fixed #35564 -- Improved readability of subclass identification."Sarah Boyce
This reverts commit f0d05a747f7a099e6c6bc58c42a787546d2212e7 due to a performance regression.
2024-06-28Refs #22712 -- Corrected deprecation of "all" argument in ↵Mariusz Felisiak
django.contrib.staticfiles.finders.find(). Features deprecated in Django 5.2 should be removed in Django 6.1.
2024-06-27Fixed #22712 -- Avoided name shadowing of "all" in ↵Andreu Vallbona
django.contrib.staticfiles.finders. Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
2024-06-27Fixed #35564 -- Improved readability of subclass identification.Jaap Roes
2024-06-26Fixed 35561 -- Made *args and **kwargs parsing more strict in ↵nessita
Model.save()/asave().
2024-06-25Fixed #35558 -- Increased inline H3 headers color prominence in admin change ↵Sarah Boyce
page.
2024-06-25Fixed #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>
2024-06-25Used Query.add_annotation where appropriate.Simon Charette
This avoids manual .annotations and .append_annotation_mask manipulations.
2024-06-25Fixed #35540 -- Fixed the padding on admin login page.arjunomray
2024-06-24Fixed #35545, Refs #32833 -- Fixed ContentTypeManager.get_for_models() crash ↵Sarah Boyce
in CreateModel migrations. Thank you to Csirmaz Bendegúz for the report and Simon Charettes for the review.
2024-06-24Fixed #35547 -- Added reset_queries to django.db.__all__.AjmalPonneth
2024-06-21Fixed #35528 -- Added EmailMultiAlternatives.body_contains() helper method.Ronny Vedrilla
2024-06-20Refs #35074 -- Avoided failed attempts to remove spatial indexes on nullable ↵Mariusz Felisiak
fields on MySQL. MySQL doesn't support spatial indexes on NULL columns, so there is no point in removing them.
2024-06-20Fixed #35537 -- Changed EmailMessage.attachments and ↵Jake Howard
EmailMultiAlternatives.alternatives to use namedtuples. This makes it more descriptive to pull out the named fields.
2024-06-20Refs #35404 -- Fixed padding of admin fieldset checkbox label.Vaarun Sinha
2024-06-18Fixed #12978 -- Added support for RSS feed stylesheets.Baptiste Mispelon
2024-06-18Fixed #35505 -- Added extrabody block to admin/base.html.stefan.ivic
2024-06-17Fixed #35483 -- Added NUL (0x00) character validation to ModelChoiceFields.Alexander Lötvall
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>
2024-06-13Fixed #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>
2024-06-13Fixed #35488 -- Fixed BaseModelFormSet.validate_unique() crash due to ↵Madalin Popa
unhashable type.
2024-06-13Fixed #35417 -- Updated BaseContext.new() with values to create a context ↵George Y. Kussumoto
that can be flattened.
2024-06-12Fixed #34789 -- Prevented updateRelatedSelectsOptions fromDevin Cox
adding entries to filter_horizontal chosen box. Co-authored-by: yokeshwaran1 <yokesh440@yahoo.com>