1
0
mirror of https://github.com/django/django.git synced 2024-12-29 04:26:28 +00:00
Commit Graph

96 Commits

Author SHA1 Message Date
Nick Pope
500e01073a
Fixed #31262 -- Added support for mappings on model fields and ChoiceField's choices. 2023-08-30 22:57:40 -03: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
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
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
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
Mariusz Felisiak
23e8868862
Refs #34233 -- Used str.removeprefix()/removesuffix(). 2023-01-18 19:11:18 +01:00
Mariusz Felisiak
8d98f99a4a Refs #32873 -- Removed settings.USE_L10N per deprecation timeline. 2023-01-17 11:49:15 +01: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
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
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
Carlton Gibson
4b8e9492d9 Refs #32559 -- Added selenium test for FloatField client-side validation.
step="any" is required for non-integer values. See:
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/number#step

Covers behaviour added in 7ec2a21be1.
2022-02-03 13:50:37 +01:00
mendespedro
e8b4feddc3 Fixed #33367 -- Fixed URLValidator crash in some edge cases. 2021-12-20 07:30:22 +01:00
mendespedro
4fd3044ca0 Fixed #33368 -- Fixed parse_duration() crash on invalid separators for decimal fractions. 2021-12-20 06:46:34 +01:00
Mariusz Felisiak
882647a82c
Used subTest() in forms.URLField() tests. 2021-12-16 06:35:44 +01:00
David Smith
c6c6cd3c5a Fixed #33235 -- Removed "for = ..." from MultiWidget's <label>.
This improves accessibility for screen reader users.
2021-11-05 11:05:52 +01:00
Claude Paroz
676bd084f2 Fixed #32873 -- Deprecated settings.USE_L10N.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2021-09-14 12:05:43 +02:00
Jacob Walls
2d0ae8da80 Fixed #29205 -- Corrected rendering of required attributes for MultiValueField subfields. 2021-08-04 17:37:04 +02:00
David Smith
fbb1984046
Refs #32956 -- Updated words ending in -wards.
AP styleguide: Virtually none of the words ending with -wards end with
an s.
2021-07-30 20:34:50 +02:00
yakimka
c542d0a072 Fixed #32949 -- Restored invalid number handling in DecimalField.validate().
DecimalField must itself validate() values, such as NaN, which cannot be
passed to validators, such as MaxValueValidator, during the
run_validators() phase.

Regression in cc3d24d7d5.
2021-07-21 10:20:24 +02:00
Dan Strokirk
f5ea9aa2f3 Fixed #32807 -- Fixed JSONField crash when redisplaying None values.
Thanks to Alex Hill for the initial patch.
2021-06-28 11:02:08 +02:00
Florian Apolloner
0b79eb3691 Fixed CVE-2021-31542 -- Tightened path & file name sanitation in file uploads. 2021-05-04 08:44:42 +02:00
Claude Paroz
7f85498eef Fixed #32110 -- Doc'd and tested enumerations for ChoiceField.choices. 2020-10-17 20:30:57 +02:00
Qi Zhao
de81676b51 Fixed #32080 -- Fixed displaying Unicode chars in forms.JSONField and read-only JSONField values in admin. 2020-10-09 08:14:17 +02:00
David Smith
b8239cae19 Refs #28009 -- Added empty_value tests for CharField subclasses. 2020-09-25 12:33:54 +02:00
David Smith
997f87c5b0 Added assertions for cleaning None values for forms.JSONField and forms.UUIDField. 2020-09-25 10:12:01 +02:00
David Smith
e875fac886
Removed unused variable in test_datetimefield_clean_input_formats. 2020-05-20 06:02:28 +02:00
sage
6789ded0a6 Fixed #12990, Refs #27694 -- Added JSONField model field.
Thanks to Adam Johnson, Carlton Gibson, Mariusz Felisiak, and Raphael
Michel for mentoring this Google Summer of Code 2019 project and
everyone else who helped with the patch.

Special thanks to Mads Jensen, Nick Pope, and Simon Charette for
extensive reviews.

Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2020-05-08 07:23:31 +02:00
François Freitag
9ef4a18dbe Changed django.forms.ValidationError imports to django.core.exceptions.ValidationError.
Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2020-04-28 10:49:00 +02:00
David Smith
9a015f4e0d Completed test coverage for forms.RegexField. 2020-04-22 10:50:35 +02:00
David Smith
911545da1d Increased test coverage for forms.ImageField.to_python(). 2020-04-09 08:45:31 +02:00
David Smith
5fbc0e07a9 Completed test coverage for forms.DurationField.to_python(). 2020-04-07 06:20:43 +02:00
David Smith
be9dd70931
Fixed typo in tests/forms_tests/field_tests/test_imagefield.py test names. 2020-04-07 06:04:51 +02:00
Claude Paroz
1487f16f2d Fixed #11385 -- Made forms.DateTimeField accept ISO 8601 date inputs.
Thanks José Padilla for the initial patch, and Carlton Gibson for the
review.
2020-01-06 10:52:09 +01:00
Claude Paroz
495d7a1ddf Reorganized forms.DateTimeField tests. 2020-01-03 10:36:58 +01:00
Hasan Ramezani
6c6d24a4fe Refs #30908 -- Added test for nonexistent path in forms.FilePathField. 2019-10-29 08:39:56 +01:00
Jon Dufresne
42b9a23267 Fixed #30400 -- Improved typography of user facing strings.
Thanks Claude Paroz for assistance with translations.
2019-06-28 16:46:18 +02:00
Shubham Bhagat
26d16c07fd Fixed #30578 - Made SelectDateWidget respect a custom date format when USE_L10N is disabled. 2019-06-26 11:07:11 +02:00
Tim Graham
838d6dcb86 Refs #29426 -- Made UUIDField render values with dashes. 2018-08-18 08:20:21 -04:00
Tim Graham
730173d1c5 Fixed #29623 -- Fixed translation failure of DurationField's "overflow" error message. 2018-08-08 06:24:52 -04:00
safu9
9fd9f8bbb2 Fixed #29284 -- Made ImageField render with accept="image/*"' HTML attribute. 2018-04-04 13:16:03 -04:00
Tim Graham
d0a42a14c0 Fixed imports per isort 4.3.1.
Partially reverted 9bcf73d788.
2018-02-02 14:44:07 -05:00
Mariusz Felisiak
9bcf73d788 Fixed imports per isort 4.3.0. 2018-02-01 09:29:46 +01:00
Jon Dufresne
ff05de760c Fixed #29038 -- Removed closing slash from HTML void tags. 2018-01-21 02:09:10 -05:00
Jon Dufresne
47d238b696 Fixed #29041 -- Changed SelectMultiple's multiple attribute to HTML5 boolean syntax. 2018-01-20 11:19:06 -05:00