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
Nick Pope
d3cb91db87
Used more augmented assignment statements.
...
Identified using the following command:
$ git grep -I '\(\<[_a-zA-Z0-9]\+\>\) *= *\1 *[-+/*^%&|<>@]'
2022-10-31 12:30:13 +01:00
DevilsAutumn
f3cd252cfc
Fixed #33995 -- Fixed FormSet.empty_form crash when empty_permitted is passed to form_kwargs.
2022-09-09 13:51:47 +02:00
Neeraj Kumar
9942f3fb49
Fixed #33830 -- Fixed VariableDoesNotExist when rendering ClearableFileInput.
2022-08-25 07:52:36 +02:00
Carlton Gibson
89e695a69b
Fixed #33876 , Refs #32229 -- Made management forms render with div.html template.
...
Thanks to Claude Paroz for the report.
2022-08-02 10:30:09 +02:00
Mariusz Felisiak
c18861804f
Fixed warnings per flake8 5.0.0.
2022-07-31 08:16:19 +02:00
David Smith
d126eba363
Refs #32339 -- Deprecated default.html form template.
...
Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
2022-05-17 11:16:54 +02:00
Kapil Bansal
3a82b5f655
Fixed #32559 -- Added 'step_size’ to numeric form fields.
...
Co-authored-by: Jacob Rief <jacob.rief@uibk.ac.at>
2022-05-12 14:16:52 +02:00
Marc Seguí Coll
262fde94de
Fixed #33622 -- Allowed customizing error messages for invalid number of forms.
...
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2022-05-10 13:42:31 +02:00
David Smith
ec5659382a
Fixed #32339 -- Added div.html form template.
2022-05-05 14:32:43 +02:00
Carlton Gibson
476d4d5087
Refs #32339 -- Allowed renderer to specify default form and formset templates.
...
Co-authored-by: David Smith <smithdc@gmail.com>
2022-04-27 10:21:04 +02:00
L
37602e4948
Fixed #33656 -- Fixed MultiWidget crash when compressed value is a tuple.
2022-04-26 07:06:26 +02:00
David
c8459708a7
Refs #32339 -- Added use_fieldset to Widget.
2022-03-30 16:28:14 +02:00
Mariusz Felisiak
abfdb4d7f3
Reverted "Fixed forms_tests.tests.test_renderers with Jinja 3.1.0+."
...
This reverts commit 1d9d082acf
.
2022-03-26 12:27:30 +01:00
Mariusz Felisiak
1d9d082acf
Fixed forms_tests.tests.test_renderers with Jinja 3.1.0+.
...
See https://github.com/pallets/jinja/pull/1621 .
2022-03-25 08:48:32 +01:00
Carlton Gibson
bb61f0186d
Refs #32365 -- Removed internal uses of utils.timezone.utc alias.
...
Remaining test case ensures that uses of the alias are mapped
canonically by the migration writer.
2022-03-24 06:29:50 +01:00
Claude Paroz
4c76ffc2d6
Fixed #29490 -- Added support for object-based Media CSS and JS paths.
2022-02-10 08:48:27 +01:00
Mariusz Felisiak
7119f40c98
Refs #33476 -- Refactored code to strictly match 88 characters line length.
2022-02-07 20:37:05 +01:00
django-bot
9c19aff7c7
Refs #33476 -- Reformatted code with Black.
2022-02-07 20:37:05 +01:00