summaryrefslogtreecommitdiff
path: root/django
AgeCommit message (Collapse)Author
2023-11-20Refs #31026 -- Simplified BaseForm.get_context().David Smith
bf.errors returns an ErrorList. Access this directly and avoid creating a new instance in BaseForm.get_context() Calling str() on the ErrorList can also be deferred to when the variable used in the template.
2023-11-18Refs #34975 -- Handled optional source expressions in Expression.get_refs().Simon Charette
While no code is directly exercising get_refs in a way that triggers a crash some expressions such as Window stash None in source_expressions which can obscure the origin of some bugs. Handling None values like we do in other source_expression traversing methods such as .contains_aggregates ensures we don't run into surprises in the future where get_refs() might be used for a different purpose.
2023-11-18Refs #34717 -- Avoided computing aggregate refs twice.Simon Charette
2023-11-18Refs #34975 -- Complemented rhs filtering aggregations for __in lookup.Simon Charette
While this isn't a regression it's clear that similar logic should be applied when dealing with lists of expressions passed as a lookup value.
2023-11-18Fixed #34975 -- Fixed crash of conditional aggregate() over aggregations.Simon Charette
Adjustments made to solve_lookup_type to defer the resolving of references for summarized aggregates failed to account for similar requirements for lookup values which can also reference annotations through Aggregate.filter. Regression in b181cae2e3697b2e53b5b67ac67e59f3b05a6f0d. Refs #25307. Thanks Sergey Nesterenko for the report.
2023-11-17Refs #32819 -- Established relationship between form fieldsets and their ↵David Smith
help text. This adds aria-describedby for widgets rendered in a fieldset such as radios. aria-describedby for these widgets is added to the <fieldset> element rather than each <input>.
2023-11-16Refs #32819 -- Used auto_id instead of id_for_label as unique identifier for ↵David Smith
the field. `id_for_label` is blank for widgets with multiple inputs such as radios and multiple checkboxes. Therefore , `help_text` for fields using these widgets cannot currently be associated using `aria-describedby`. `id_for_label` is being used as a guard to avoid incorrectly adding `aria-describedby` to those widgets. This change uses `auto_id` as the unique identified for the fields `help_text`. A guard is added to avoid incorrectly adding `aria-describedby` to inputs by checking the widget's `use_fieldset` attribute. Fields rendered in a `<fieldset>` should have `aria-describedby` added to the `<fieldset>` and not every `<input>`.
2023-11-14Refs #34944 -- Propagated system checks for GeneratedField.output_field.Mariusz Felisiak
2023-11-14Fixed #34944 -- Made GeneratedField.output_field required.Mariusz Felisiak
Regression in f333e3513e8bdf5ffeb6eeb63021c230082e6f95.
2023-11-14Reverted "Refs #30446, Refs #34944 -- Fixed crash when adding GeneratedField ↵Mariusz Felisiak
with string Value()." This reverts commit 8b1acc0440418ac8f45ba48e2dfcf5126c83341b.
2023-11-14Fixed #34955 -- Made Concat() use || operator on PostgreSQL.Simon Charette
This also avoids casting string based expressions in Concat() on PostgreSQL.
2023-11-14Fixed #34919 -- Added scope attribute to admindocs model templates.jedidiah
2023-11-13Fixed #34952 -- Copied dir list when processing locale folders to avoid ↵Andrew Cordery
missing entries during os.walk traversal. Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
2023-11-13Fixed #34967 -- Fixed queryset crash when grouping by constants on SQLite < ↵David Sanders
3.39. On SQLite < 3.39, this forces a GROUP BY clause with a HAVING clause when no grouping is specified. Co-authored-by: Simon Charette <charette.s@gmail.com>
2023-11-09Fixed #34457 -- Restored output for makemigrations --check.Adam Johnson
Co-authored-by: David Sanders <shang.xiao.sanders@gmail.com> Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
2023-11-08Refs #30446, Refs #34944 -- Fixed crash when adding GeneratedField with ↵Simon Charette
string Value(). This should allow smarter output_field inferring in functions dealing with text expressions. Regression in f333e3513e8bdf5ffeb6eeb63021c230082e6f95.
2023-11-08Reverted "Fixed #34830 -- Added request to csrf_failure view's template ↵Natalia
context." This reverts commit 535f7b5c6cea54a0796d85bbe213183d50002689.
2023-11-07Fixed #34830 -- Added request to csrf_failure view's template context.Prakhar
Co-authored-by: nessita <124304+nessita@users.noreply.github.com>
2023-11-07Fixed #34946 -- Preserved db_default on combined default field addition.Simon Charette
Regression in 7414704e88d73dafbcfbb85f9bc54cb6111439d3.
2023-11-03Fixed #34941 -- Fixed fetching decimal db_defaults for DecimalFields on Oracle.Mariusz Felisiak
This is a long standing bug in bc91f27a86090b4c688b56cd4e37f95eebe6e969 that began manifesting in 7414704e88d73dafbcfbb85f9bc54cb6111439d3.
2023-11-03Refs #34941 -- Skipped ↵Mariusz Felisiak
OperationTests.test_alter_field_change_nullable_to_decimal_database_default_not_null on Oracle.
2023-11-02Fixed #34936 -- Fixed migration crash for DecimalField with db_default on ↵David Sanders
SQLite. CAST() must be wrapped in parentheses to be recognized as an expression on SQLite. Regression in 7414704e88d73dafbcfbb85f9bc54cb6111439d3.
2023-11-02Refs #31300 -- Allowed testing GeneratedField without collation.Tim Graham
CockroachDB and Snowflake don't support it.
2023-11-02Fixed #34927 -- Fixed admin system check for inlines with foreign keys to ↵Antoine Cheneau
proxy models. Follow up to 0e8be73812a6e62d5a6b12a585d133b56bc2bf52.
2023-11-01Fixed CVE-2023-46695 -- Fixed potential DoS in UsernameField on Windows.Mariusz Felisiak
Thanks MProgrammer (https://hackerone.com/mprogrammer) for the report.
2023-10-31Fixed #34462 -- Made admin log actions in bulk.Akash Kumar Sen
This also deprecates ModelAdmin.log_deletion() and LogEntryManager.log_action().
2023-10-31Fixed #32106 -- Preserved HTTP_HOST in test Client when following redirects.Ben Cail
Co-authored-by: David Sanders <shang.xiao.sanders@gmail.com>
2023-10-30Refs #29850 -- Added exclusion support to window frames.Sarah Boyce
2023-10-30Fixed #34932 -- Restored varchar_pattern_ops/text_pattern_ops index creation ↵Tom Carrick
when deterministic collaction is set. Regression in f3f9d03edf17ccfa17263c7efa0b1350d1ac9278 (4.2) and 8ed25d65ea7546fafd808086fa07e7e5bb5428fc (5.0).
2023-10-28Refs #29850 -- Added RowRange support for positive integer start and ↵Sarah Boyce
negative integer end.
2023-10-28Fixed #34943 -- Made EmailValidator.__eq__() ignore domain_allowlist ordering.ksg
Signed-off-by: ksg97031 <ksg97031@gmail.com>
2023-10-26Fixed #10941 -- Added {% query_string %} template tag.Tom Carrick
2023-10-25Fixed #34904 -- Prevented mutating sent emails from outbox in locmem email ↵sindre
backend.
2023-10-24Fixed #34923 -- Avoided initializing LEVEL_TAGS when importing ↵Mariusz Felisiak
django.contrib.messages. Regression in b7fe36ad37fb18c4bc7932c0aec6ae4f299b9622. Thanks James Gillard for the report.
2023-10-24Fixed #34920 -- Made FileExtensionValidator.__eq__() ignore ↵ksg97031
allowed_extensions ordering.
2023-10-23Fixed #34899 -- Added blank choice to forms' callable choices lazily.Nick Pope
2023-10-23Refs #34899 -- Extracted Field.flatchoices to flatten_choices helper function.Nick Pope
Co-authored-by: Natalia Bidart <124304+nessita@users.noreply.github.com>
2023-10-23Refs #31262 -- Added __eq__() and __getitem__() to BaseChoiceIterator.Nick Pope
This makes it easier to work with lazy iterators used for callables, etc. when extracting items or comparing to lists, e.g. during testing. Also added `BaseChoiceIterator.__iter__()` to make it clear that subclasses must implement this and added `__all__` to the module. Co-authored-by: Adam Johnson <me@adamj.eu> Co-authored-by: Natalia Bidart <124304+nessita@users.noreply.github.com>
2023-10-23Refs #34118 -- Avoided repeat coroutine checks in MiddlewareMixin.Adam Johnson
2023-10-23Fixed #34903, Refs #34825 -- Made workers initialization respect empty set ↵David Sanders
of used connections. Thanks to David Smith for the investigation & patch. Regression in 2128a73713735fb794ca6565fd5d7792293f5cfa. Follow up to a5905b164dbf52e59fa646af9c3d523c0804d86a. Co-authored-by: David Sanders <shang.xiao.sanders@gmail.com>
2023-10-22Fixed #34921 -- Fixed crash of warning for unbound naive datetimes.David Sanders
2023-10-21Fixed #34913 -- Added borders on high contrast mode in the admin.Cheuk Ting Ho
2023-10-21Fixed #34912 -- Fixed size of back links and bookmarklet help in admindocs ↵Chris Frisina
pages.
2023-10-20Fixed #34911 -- Corrected HTML heading levels on admindocs' main page.laserhyena
2023-10-19Fixed #34905 -- Corrected admin's main content element rendered in <main> tag.ontowhee
Regression in 91e617c743b21a0ebad01f18623a8b31f6f58500. Thanks Tom Carrick for the report.
2023-10-18Refs #34043 -- Added --screenshots option to runtests.py and selenium tests.Sarah Boyce
2023-10-17Removed unreachable code from ModelAdmin.response_change().Mariana
ModelAdmin.response_add() is always used when _saveasnew is set.
2023-10-16Refs #34043 -- Added context managers to SeleniumTestCase for changing ↵Sarah Boyce
window size.
2023-10-16Fixed #34798 -- Fixed QuerySet.aggregate() crash when referencing ↵Simon Charette
expressions containing subqueries. Regression in 59bea9efd2768102fc9d3aedda469502c218e9b7, complements e5c844d6f2a4ac6ae674d741b5f1fa2a688cedf4. Refs #28477, #34551. Thanks Haldun Komsuoglu for the report.
2023-10-11Fixed #12241 -- Preserved query strings when using "Save and continue/add ↵Mariana
another" in admin. Co-authored-by: Grady Yu <gradyy@users.noreply.github.com> Co-authored-by: David Sanders <shang.xiao.sanders@gmail.com> Co-authored-by: Matthew Newton <matthewn@berkeley.edu>