summaryrefslogtreecommitdiff
path: root/tests/admin_widgets
AgeCommit message (Collapse)Author
9 daysFixed #35870 -- Made blank choice label in forms more accessible.Annabelle Wiegart
Added new constant django.db.models.fields.BLANK_CHOICE_LABEL for an accessible and translatable blank choice label in forms. Deprecated django.db.models.fields.BLANK_CHOICE_DASH constant. Added the immediately deprecated transitional setting USE_BLANK_CHOICE_DASH. Co-Authored-By: Marijke Luttekes <mail@marijkeluttekes.dev>
2026-02-27Fixed #34643 -- Moved inputs beneath labels and errors in admin forms.antoliny0919
Thanks Sarah Boyce and Jacob Walls for reviews. Co-authored-by: Hrushikesh Vaidya <hrushikeshrv@gmail.com>
2026-01-22Fixed #13883 -- Rendered named choice groups with <optgroup> in ↵seanhelvey
FilteredSelectMultiple. This patch adds support for <optgroup>s in FilteredSelectMultiple widgets. When a popup returns a new object, if the source field contains optgroup choices, the optgroup is now also included in the response data. Additionally, this adds error handling for invalid source_model parameters to prevent crashes and display user-friendly error messages instead. Co-authored-by: Michael McLarnon <mmclar@gmail.com>
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-19Fixed #35892 -- Supported Widget.use_fieldset in admin forms.antoliny0919
2025-07-23Refs #36500 -- Rewrapped long docstrings and block comments via a script.django-bot
Rewrapped long docstrings and block comments to 79 characters + newline using script from https://github.com/medmunds/autofix-w505.
2025-07-18Triggered window resize to fix layout issues.Sarah Boyce
2025-06-02Fixed #36423 -- Prevented filter_horizontal buttons from intercepting form ↵Blayze
submission. In the admin's filter_horizontal widget, optional action buttons like "Choose all", "Remove all", etc. were changed from `<a>` to `<button>` elements in #34619, but without specifying `type="button"`. As a result, when pressing Enter while focused on a form input, these buttons could be triggered and intercept form submission. Explicitly set `type="button"` on these control buttons to prevent them from acting as submit buttons. Thanks Antoliny Lee for the quick triage and review. Regression in 857b1048d53ebf5fc5581c110e85c212b81ca83a.
2025-05-15Refs #34488 -- Made test files path resolution independent of current ↵Tim Graham
working directory in ClearableFileInput selenium tests.
2025-05-09Removed hardcoded pks in admin selenium tests.Tim Graham
2025-01-23Fixed #36013 -- Removed use of IDNA-2003 in django.utils.html.Mike Edmunds
Removed obsolete and potentially problematic IDNA 2003 ("punycode") encoding of international domain names in smart_urlquote() and Urlizer, which are used (only) by AdminURLFieldWidget and the urlize/urlizetrunc template filters. Changed to use percent-encoded UTF-8, which defers IDNA details to the browser (like other URLs rendered by Django).
2025-01-15Refs #34380 -- Changed the URLField default scheme to https and removed ↵Sarah Boyce
FORMS_URLFIELD_ASSUME_HTTPS per deprecation timeline.
2025-01-09Fixed #35940 -- Disabled SelectFilter add/remove buttons when appropriate.Brock
2024-11-29Fixed #35791 -- Updated icon button dimensions to 24x24 pixels.Tainara Palmeira
This is to meet the WCAG 2.5.8 minimum size requirement. Co-authored-by: Eva Nanyonga <evewish@gmail.com>
2024-11-20Fixed #34619 -- Associated FilteredSelectMultiple elements to their label ↵GappleBee
and help text.
2024-08-06Fixed CVE-2024-41991 -- Prevented potential ReDoS in ↵Mariusz Felisiak
django.utils.html.urlize() and AdminURLFieldWidget. Thanks Seokchan Yoon for the report. Co-authored-by: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com>
2024-08-02Fixed #35489 -- Fixed vertical alignment of raw_id_fields widget.Vaarun Sinha
Co-authored-by: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com>
2024-06-12Fixed #34789 -- Prevented updateRelatedSelectsOptions fromDevin Cox
adding entries to filter_horizontal chosen box. Co-authored-by: yokeshwaran1 <yokesh440@yahoo.com>
2024-04-02Fixed #35330 -- Fixed the update of related widgets when the referenced ↵devin13cox
model is camel case named. Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
2024-03-14Fixed #35273 -- Fixed rendering AdminFileWidget's attributes.Johannes Maron
Regression in 8a6c0203c4e92908c2b26ba54feba4ce7e76d081.
2024-01-10Fixed #28404 -- Made displaying values in admin respect Field's empty_values.Alexander Lazarević
2023-11-30Refs #34995 -- Made Selenium tests more robust for admin_views and ↵Sarah Boyce
admin_widgets suites. Depending on screen sizes, the selenium tests that would "click" or interact with an element outside the scope of the visible window would produce test failures (raising ElementNotInteractableException in CI runs). This branch switches those to using ActionChains, which ensures that the click (or other interaction) is performed only after successfully completing the move to the relevant element. Co-authored-by: Tom Carrick <tom@carrick.eu>
2023-10-16Refs #34043 -- Added context managers to SeleniumTestCase for changing ↵Sarah Boyce
window size.
2023-06-14Fixed date_time_picker_shortcuts() tests on Windows.David Smith
Windows does not allow overriding TIME_ZONE as time.tzset() is only available on Unix.
2023-06-09Fixed #34645 -- Restored alignment for admin date/time timezone warnings.Mariusz Felisiak
Regression in 96a598356a9ea8c2c05b22cadc12e256a3b295fd.
2023-04-28Fixed #34380 -- Allowed specifying a default URL scheme in forms.URLField.Coen van der Kamp
This also deprecates "http" as the default scheme.
2023-04-21Fixed #34488 -- Made ClearableFileInput preserve "Clear" checked attribute ↵Marcelo Galigniana
when form is invalid.
2023-02-01Refs #33476 -- Applied Black's 2023 stable style.David Smith
Black 23.1.0 is released which, as the first release of the year, introduces the 2023 stable style. This incorporates most of last year's preview style. https://github.com/psf/black/releases/tag/23.1.0
2023-01-18Fixed #34233 -- Dropped support for Python 3.8 and 3.9.Mariusz Felisiak
2022-10-27Refs #19215 -- Fixed admin_widgets tests if Pillow isn't installed.Mariusz Felisiak
Follow up to c0fc1b5302f5d9d82e2255fb5758321fbac34949.
2022-10-25Fixed #19215 -- Fixed rendering ClearableFileInput when editing with invalid ↵Marcelo Galigniana
files. Thanks Michael Cardillo for the initial patch.
2022-10-24Fixed flaky test_ForeignKey_using_to_field test.Marcelo Galigniana
2022-08-03Fixed #33888 -- Fixed get_select2_language() crash with no language activated.Claude Paroz
Regression in 3079133c73f3b8b0e929673b06b62dce1f54be71.
2022-06-28Fixed #33805 -- Made admin's many-to-many widgets do not display help text ↵Ankur
for selecting values when allow_multiple_selected is False.
2022-02-28Fixed #33524 -- Allowed overriding empty_label for ForeignKey in ↵Hrushikesh Vaidya
ModelAdmin.radio_fields.
2022-02-25Fixed #33267 -- Added link to related item to related widget wrapper in admin.Shubh1815
2022-02-18Fixed #33514 -- Added fallbacks to subsequent language codes in Select2 ↵My-Name-Is-Nabil
translations.
2022-02-07Refs #33476 -- Refactored code to strictly match 88 characters line length.Mariusz Felisiak
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2021-11-29Fixed #32545 -- Improved admin widget for raw_id_fields for UUIDFields.Shubh1815
Co-Authored-By: Jerome Leclanche <jerome@leclan.ch>
2021-10-21Fixed #33211 -- Updated tests for Selenium 4.0.0.Carlton Gibson
Replaced deprecated `find_element[s]_by_*()` usages, in favour of `find_element[s]()` with an explicit `By`.
2021-10-21Refs #33211 -- Added assertCountSeleniumElements() test helper.Carlton Gibson
2021-09-21Fixed #33070 -- Fixed loading translations with language subtags in admin's ↵Cleiton Lima
Select2 widget.
2021-09-16Fixed #32365 -- Made zoneinfo the default timezone implementation.Carlton Gibson
Thanks to Adam Johnson, Aymeric Augustin, David Smith, Mariusz Felisiak, Nick Pope, and Paul Ganssle for reviews.
2021-09-14Fixed #32873 -- Deprecated settings.USE_L10N.Claude Paroz
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2021-04-29Fixed capitalization of "ECMAScript" and "JavaScript".Nick Pope
2021-03-18Fixed #32466 -- Corrected autocomplete to_field resolution for complex cases.Johannes Maron
In MTI or ForeignKey as primary key cases, it is required to fetch the attname from the field instance on the remote model in order to reliably resolve the to_field_name. Co-authored-by: Johannes Maron <info@johanneshoppe.com> Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com> Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
2021-01-12Fixed #29010, Fixed #29138 -- Added limit_choices_to and to_field support to ↵Johannes Maron
autocomplete fields. * Fixed #29010 -- Added limit_choices_to support to autocomplete fields. * Fixed #29138 -- Allowed autocomplete fields to target a custom to_field rather than the PK.
2020-06-03Fixed CVE-2020-13596 -- Fixed potential XSS in admin ForeignKeyRawIdWidget.Jon Dufresne
2020-06-01Fixed #31536 -- Fixed rendering of disabled AdminFileWidget and ↵Carles Pina
ClearableFileInput.