1
0
mirror of https://github.com/django/django.git synced 2024-12-23 01:25:58 +00:00
Commit Graph

530 Commits

Author SHA1 Message Date
antoliny0919
f60d5e46e1 Fixed #35913 -- Prevented formset name suffix 'FormFormSet'. 2024-11-20 11:36:33 +01:00
Simon Charette
57307bbc7d Fixed #35666 -- Documented stacklevel usage and testing, and adjusted test suite accordingly.
Over the years we've had multiple instances of hit and misses when
emitting warnings: either setting the wrong stacklevel or not setting
it at all.

This work adds assertions for the existing warnings that were declaring
the correct stacklevel, but were lacking tests for it.
2024-08-28 11:44:05 -03:00
Simon Charette
7e6e1c8383 Refs #32339 -- Adjusted deprecation warning stacklevel in transitional form renderers. 2024-08-28 11:44:05 -03:00
lucasesposito
b478cae006 Fixed #35601 -- Added TelInput widget. 2024-08-02 11:31:54 +02:00
arjunomray
946c3cf734 Fixed #35599 -- Added ColorInput widget. 2024-08-02 09:51:49 +02:00
Jeremy Thompson
30a60e8492 Fixed #35598 -- Added SearchInput widget. 2024-07-31 13:11:45 +02:00
Mariusz Felisiak
b06cf62c88 Cleaned up temporary test directories in tests. 2024-07-22 08:51:01 +02:00
David Smith
c187f5f924 Refs #32819 -- Avoided adding 'aria-describedby' to hidden inputs.
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-30 11:11:02 +02:00
Johannes Maron
3d7235c67b Refs #34488 -- Made ClearableFileInput preserve "Clear" checked attribute when form is invalid. 2024-03-14 14:03:14 +01:00
Mariusz Felisiak
305757aec1
Applied Black's 2024 stable style.
https://github.com/psf/black/releases/tag/24.1.0
2024-01-26 12:45:07 +01:00
Mariusz Felisiak
51967b56c4
Corrected forms imports in forms_tests/tests/test_forms.py. 2024-01-18 12:20:19 +01:00
Mariusz Felisiak
0c5456ef37
Used enterClassContext() where appropriate. 2024-01-04 05:55:29 +01:00
Mariusz Felisiak
d88ec42bd0
Used addCleanup() in tests where appropriate. 2023-12-31 10:01:31 +01:00
Mariusz Felisiak
a4931cd75a
Refs #34380 -- Added FORMS_URLFIELD_ASSUME_HTTPS transitional setting.
This allows early adoption of the new default "https".
2023-11-28 20:04:21 +01:00
Nick Pope
baf705f34a Refs #34986 -- Fixed some test assertions for PyPy.
These failures were due to minor inconsistencies or implementation
differences between CPython and PyPy.
2023-11-28 06:19:38 +01:00
David Smith
eec7e9ba89 Refs #32819 -- Established relationship between form fieldsets and their 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-17 08:12:36 +01:00
David Smith
557fa51837 Refs #32819 -- Added aria-describedby test for widgets with custom id. 2023-11-17 05:43:33 +01:00
Mariusz Felisiak
6ad0dbc8d9
Refs #15667 -- Added resetting default renderer when FORM_RENDERER is changed. 2023-09-29 08:54:13 +02:00
Nick Pope
500e01073a
Fixed #31262 -- Added support for mappings on model fields and ChoiceField's choices. 2023-08-30 22:57:40 -03:00
Gregor Jerše
10725a3187 Fixed #32820 -- Added aria-invalid="true" to fields with errors.
Co-authored-by: Demetris Stavrou <demestav@gmail.com>
Co-authored-by: David Smith <smithdc@gmail.com>
2023-08-01 06:08:04 +02:00
nessita
1ad7761ee6
Refs #34655 -- Made cosmetic edits to RadioSelect tests.
Follow up to f9c5958b8f.
2023-07-31 20:17:10 +02:00
Jakub Bagiński
f9c5958b8f
Fixed #34655 -- Increased radioselect's test coverage. 2023-07-28 09:18:07 -03:00
Christopher Cave-Ayland
95e4d6b813 Fixed #34532 -- Made formset_factory() respect Form's default_renderer.
Co-authored-by: David Smith <smithdc@gmail.com>
2023-07-24 09:09:53 +02:00
Sage Abdullah
3f73df44f2 Fixed #34705 -- Reallowed BoundField.as_widget()'s attrs argument to set aria-describedby.
Regression in 966ecdd482.
2023-07-12 05:43:41 +02:00
Gregor Jerše
966ecdd482 Fixed #32819 -- Established relationship between form fields and their help text.
Thanks Nimra for the initial patch.

Thanks Natalia Bidart, Thibaud Colas, David Smith, and Mariusz Felisiak
for reviews.
2023-07-06 08:03:19 +02:00
Mariusz Felisiak
ad0410ec4f Fixed CVE-2023-36053 -- Prevented potential ReDoS in EmailValidator and URLValidator.
Thanks Seokchan Yoon for reports.
2023-07-03 08:16:55 +02:00
Jacob Rief
1fe0b167af Fixed #34473 -- Fixed step validation for form fields with non-zero minimum value. 2023-06-16 08:38:28 +02:00
Carlton Gibson
4a5753fb0a
Refs #32339 -- Fixed super() call in deprecated renderers.
Missing function call `()` leads to:

TypeError: descriptor '__init__' of 'super' object needs an argument

Regression in b209518089.
2023-05-17 11:11:43 -03:00
Mariusz Felisiak
fcfbf08abe
Fixed MultipleFileFieldTest.test_file_multiple_validation() test if Pillow isn't installed.
Follow up to fb4c55d9ec.
2023-05-04 08:09:02 +02:00
Mariusz Felisiak
fb4c55d9ec Fixed CVE-2023-31047, Fixed #31710 -- Prevented potential bypass of validation when uploading multiple files using one form field.
Thanks Moataz Al-Sharida and nawaik for reports.

Co-authored-by: Shai Berger <shai@platonix.com>
Co-authored-by: nessita <124304+nessita@users.noreply.github.com>
2023-05-03 13:42:00 +02:00
Coen van der Kamp
7bbbadc693 Fixed #34380 -- Allowed specifying a default URL scheme in forms.URLField.
This also deprecates "http" as the default scheme.
2023-04-28 06:58:10 +02:00
Marcelo Galigniana
8a6c0203c4 Fixed #34488 -- Made ClearableFileInput preserve "Clear" checked attribute when form is invalid. 2023-04-21 07:48:27 +02:00
David Smith
cad376f844 Fixed #34077 -- Added form field rendering. 2023-03-24 10:16:30 +01:00
Jure Slak
d22209cb42 Fixed #34424 -- Fixed SelectDateWidget crash for inputs raising OverflowError. 2023-03-22 07:59:39 +01:00
Jure Slak
b4870e7196 Refs #34434 -- Added assertion for cleaning 0-0-0 for forms.DateField. 2023-03-22 07:50:03 +01:00
T. Franzel
a2eaea8f22 Fixed #34388 -- Allowed using choice enumeration types directly on model and form fields. 2023-03-21 19:44:41 +01:00
David Smith
051d5944f8 Refs #33134, Refs #34077 -- Adjusted form rendering recursion test.
Adjusted recursion depth test to use str() rather than the form or
field’s render() method.
2023-03-21 15:12:56 +01:00
Laurens Verhoeven
6cbc403b8e Fixed #34349 -- Fixed FormSet.empty_form crash when deleting extra forms is disabled. 2023-02-20 09:04:29 +01:00
Marcelo Galigniana
5b23d6666e Completed test coverage for django.forms.utils. 2023-02-15 07:36:05 +01:00
David Smith
097e3a70c1 Refs #33476 -- Applied Black's 2023 stable style.
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-02-01 11:04:38 +01:00
Nick Pope
1e62a64202 Refs #32528 -- Simplified Media.merge().
This avoids building up a second datastructure for the duplicate files
warning case and simply flatten and strip duplicates if that case ever
arises.
2023-01-19 06:33:39 +01:00
Mariusz Felisiak
23e8868862
Refs #34233 -- Used str.removeprefix()/removesuffix(). 2023-01-18 19:11:18 +01:00
Mariusz Felisiak
b209518089
Refs #32339 -- Deprecated transitional form renderers. 2023-01-18 11:08:39 +01:00
Mariusz Felisiak
98756c685e Refs #32339 -- Changed default form and formset rendering style to div-based.
Per deprecation timeline.

This also removes "django/forms/default.html" and
"django/forms/formsets/default.html" templates.
2023-01-17 11:49:15 +01:00
Mariusz Felisiak
31878b4d73 Refs #31026 -- Removed ability to return string when rendering ErrorDict/ErrorList.
Per deprecation timeline.
2023-01-17 11:49:15 +01:00
Mariusz Felisiak
182d25eb7a Refs #31026 -- Removed BaseForm._html_output() per deprecation timeline. 2023-01-17 11:49:15 +01:00
Mariusz Felisiak
8d98f99a4a Refs #32873 -- Removed settings.USE_L10N per deprecation timeline. 2023-01-17 11:49:15 +01:00
Mariusz Felisiak
60a7bd8986
Refs #34119 -- Skipped test_callable_default_hidden_widget_value_not_overridden when JSONField is not supported. 2022-11-28 09:47:52 +01:00
David Sanders
25904db915 Fixed #34119 -- Prevented callable default hidden widget value from being overridden.
Thanks to Benjamin Rigaud for the report.
2022-11-18 13:12:15 +01:00
Francesco Panico
51faf4bd17 Fixed #34148 -- Reverted "Fixed #32901 -- Optimized BaseForm.__getitem__()."
This reverts commit edde2a0699.

Thanks Jan Pieter Waagmeester for the report.
2022-11-18 08:06:13 +01:00