Commit Graph

70 Commits

Author SHA1 Message Date
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
Fabio Bonelli c886f3dee3 Fixed #29006 -- Fixed DecimalField.clean() crash on sNaN values. 2018-01-10 20:30:44 -05:00
Tim Graham 1c95737ebe Reduced redundancy in DecimalField tests with subTest(). 2018-01-10 20:30:24 -05:00
Tim Graham ec2ce4517a Fixed #28882 -- Fixed cleaning of disabled MultiValueFields.
Thanks avalanchy for the initial patch.
2018-01-05 15:49:54 -05:00
Srinivas Reddy Thatiparthy 55b5393bd2 Fixed #28474 -- Made DurationField raise ValidationError for inputs that raised OverflowError. 2017-10-25 18:05:13 -04:00
Josh Schneier e8c4596329 Fixed #28562 -- Fixed DecimalValidator handling of positive exponent scientific notation. 2017-09-27 09:42:04 -04:00
Josh Schneier 48c394a6fc Fixed #28555 -- Made CharField convert whitespace-only values to the empty_value when strip is enabled. 2017-09-05 12:41:38 -04:00
Alejandro Zamora 90d7b912b9 Fixed #28201 -- Added ProhibitNullCharactersValidator and used it on CharField form field. 2017-08-12 20:14:14 -04:00
Mads Jensen a51c4de194 Used assertRaisesMessage() to test Django's error messages. 2017-07-29 19:07:23 -04:00
Srinivas Reddy Thatiparthy b306c0c1a3 Fixed #28264 -- Made FilePathField sort files and directories when recursive=True. 2017-07-29 09:15:46 -04:00
Srinivas Reddy Thatiparthy 71ff9a74cb Created a dedicated test directory for FilePathField tests. 2017-07-17 16:40:34 -04:00
Srinivas Reddy Thatiparthy 5debbdfcc8 Fixed #28387 -- Fixed has_changed() for disabled form fields that subclass it. 2017-07-14 13:06:51 -04:00
Claude Paroz 43b574007e Fixed #28192 -- Required passing optional form field args as keyword args. 2017-06-03 10:49:01 -04:00
Claude Paroz 54caca2d34 Refs #28192 -- Fixed documentation of ChoiceField choices requirement
Thanks Tim Graham for noticing the issue.
2017-06-03 16:17:03 +02:00
Manatsawin Hanmongkolchai a0c07d77fc Fixed #28242 -- Moved ImageField file extension validation to the form field. 2017-06-01 10:13:23 -04:00
Tim Graham 84fb50df67 Fixed a forms test after updated translations. 2017-05-31 19:29:34 -04:00
Bruno Alla 6092ea8fa6 Refs #27804 -- Used subTest() in several tests. 2017-05-24 08:36:34 -04:00
Tim Graham 851874fe0a Removed obsolete Widget.format_output() in tests.
Obsolete since b52c73008a.
2017-04-24 13:41:34 -04:00
Raphael Michel bde814142a Fixed #22654 -- Broken decimal validation 2017-04-07 12:45:08 +02:00
Tim Graham 75f0070a54 Fixed #27308 -- Fixed BytesWarnings in the test suite. 2017-02-17 16:04:45 -05:00
Tim Graham 500532c95d Refs #23919 -- Removed default 'utf-8' argument for str.encode()/decode(). 2017-02-09 09:03:47 -05:00
chillaranand d6eaf7c018 Refs #23919 -- Replaced super(ClassName, self) with super(). 2017-01-25 12:23:46 -05:00
Tim Graham 4e729feaa6 Refs #23919 -- Removed django.utils._os.upath()/npath()/abspathu() usage.
These functions do nothing on Python 3.
2017-01-20 08:01:02 -05:00
Tim Graham 109b33f64c Refs #23919 -- Simplified assertRaisesRegex()'s that accounted for Python 2. 2017-01-20 08:49:47 +01:00
Simon Charette cecc079168 Refs #23919 -- Stopped inheriting from object to define new style classes. 2017-01-19 08:39:46 +01:00
Claude Paroz 7b2f2e74ad Refs #23919 -- Removed six.<various>_types usage
Thanks Tim Graham and Simon Charette for the reviews.
2017-01-18 20:18:46 +01:00
Claude Paroz d7b9aaa366 Refs #23919 -- Removed encoding preambles and future imports 2017-01-18 09:55:19 +01:00