Nick Pope
46346f8ea0
Refs #32738 -- Added sanitize_strftime_format() to replace datetime_safe.
2021-05-12 14:42:17 +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
Jerin Peter George
1adc09064f
Fixed #32347 -- Made ModelChoiceField include the value in ValidationError for invalid_choice.
2021-01-26 09:31:53 +01:00
Mariusz Felisiak
bf770cc825
Refs #8760 -- Removed "list" message for ModelMultipleChoiceField per deprecation timeline.
2021-01-14 17:50:04 +01:00
Jon Dufresne
859cd7c6b4
Fixed #22276 -- Fixed crash when formset management form is invalid.
...
Co-authored-by: Patryk Zawadzki <patrys@room-303.com>
2020-11-05 10:40:41 +01:00
manav014
096b14f0ac
Fixed #13060 -- Improved error message when ManagementForm data is missing.
2020-10-21 11:47:07 +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
meghanabhange
848770dd2c
Fixed #32042 -- Improved error messages for the number of submitted forms in formsets.
2020-09-28 07:05:34 +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
599f2f79e2
Fixed #30563 -- Optimized form Media by removing duplicated assets when adding.
2020-09-24 13:53:06 +02:00
David Smith
1ac337cca6
Refs #30563 -- Added tests for merging form Media with different ordering.
2020-09-24 13:53:02 +02:00
Mariusz Felisiak
75d7af43c1
Corrected docstring quotes in various code.
2020-09-22 10:30:53 +02:00
Jon Dufresne
83fbaa9231
Fixed #31806 -- Made validators include the value in ValidationErrors.
2020-07-27 13:03:26 +02:00
Jon Dufresne
013e06bb37
Refs #31806 -- Added tests for including the value in some ValidationErrors.
2020-07-27 13:03:19 +02:00
Claude Paroz
00727d384b
Refs #30578 -- Made SelectDateWidget.format_value() independent of USE_L10N.
2020-07-10 13:00:37 +02:00
David Smith
162765d6c3
Fixed #9061 -- Allowed FormSets to disable deleting extra forms.
...
Thanks to Dan Ward for the initial patch.
2020-06-24 09:26:25 +02:00
David Smith
433dd737f9
Fixed #20347 -- Allowed customizing the maximum number of instantiated forms in formsets.
...
Co-authored-by: ethurgood <ethurgood@gmail.com>
2020-06-05 12:01:32 +02:00
David Smith
b5aa9cb20f
Refs #20347 -- Added test for formset_factory()'s absolute_max default.
...
Co-authored-by: ethurgood <ethurgood@gmail.com>
2020-06-05 10:00:25 +02:00
Carles Pina
e46c2326c8
Fixed #31536 -- Fixed rendering of disabled AdminFileWidget and ClearableFileInput.
2020-06-01 12:25:25 +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
Jon Dufresne
505fec6bad
Capitalized Unicode in docs, strings, and comments.
2020-04-20 12:10:33 +02:00
David Smith
c8c9dbfc63
Completed test coverage for BoundField.css_classes().
2020-04-10 07:37:54 +02:00
David Smith
a350bfa6f4
Fixed #13009 -- Added BoundField.widget_type property.
2020-04-10 07:11:14 +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
David Smith
27746ab28a
Fixed #7664 -- Allowed customizing suffixes of MultiWidget.widgets' names.
2020-03-24 20:05:18 +01:00
David Smith
ccf32aca44
Fixed #8760 -- Changed ModelMultipleChoiceField to use invalid_list as a error message key.
2020-03-12 09:36:01 +01:00
David Smith
5cc2c63f90
Fixed typo in tests/forms_tests/widget_tests/test_clearablefileinput.py docstring.
2020-03-11 08:50:51 +01:00
Hasan Ramezani
49275c5488
Fixed #30261 -- Prevented Form._html_output() from mutating errors if hidden fields have errors.
2020-02-13 08:12:44 +01:00
Shubham singh
ffcf1a8ebf
Fixed #31118 -- Made FileInput to avoid the required attribute when initial data exists.
2020-01-08 09:15:31 +01: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
Jon Dufresne
e703b93a65
Fixed #31080 -- Removed redundant type="text/javascript" attribute from <script> tags.
2019-12-11 09:49:54 +01:00
Peter Andersen
02eff7ef60
Fixed #31073 -- Prevented CheckboxInput.get_context() from mutating attrs.
2019-12-10 12:27:50 +01:00
Carlton Gibson
ee4a19053a
Fixed #31012 -- Reverted "Fixed #29056 -- Fixed HTML5 validation of required SelectDateWidget."
...
This reverts commit f038214d91
.
The initial issue was incorrect. Django 2.2, and before, did not
generate invalid HTML as reported. With f03821 in place invalid HTML
was generated.
Thanks to Kevin Brown for follow-up report and investigation.
2019-11-21 20:53:31 +01:00
Nick Pope
7552de7866
Used more specific unittest assertions in tests.
...
* assertIsNone()/assertIsNotNone() instead of comparing to None.
* assertLess() for < comparisons.
* assertIs() for 'is' expressions.
* assertIsInstance() for isinstance() expressions.
* rounding of assertAlmostEqual() for round() expressions.
* assertIs(..., True/False) instead of comparing to True/False.
* assertIs()/assertIsNot() for ==/!= comparisons.
* assertNotEqual() for == comparisons.
* assertTrue()/assertFalse() instead of comparing to True/False.
2019-10-29 12:37:30 +01:00
Hasan Ramezani
6c6d24a4fe
Refs #30908 -- Added test for nonexistent path in forms.FilePathField.
2019-10-29 08:39:56 +01:00
Hasan Ramezani
a28d1b38e5
Fixed #30839 -- Fixed Field.__deepcopy__() so forms don't share error messages.
2019-10-08 10:07:05 +02:00
Min ho Kim
65e86948b8
Corrected several typos in string literals and test names.
2019-08-07 11:23:14 +02:00
Jon Dufresne
d89053585e
Improved error message when index in __getitem__() is invalid.
2019-07-23 20:12:08 +02: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
Mariusz Felisiak
b08a18f17b
Fixed LiveWidgetTests.test_textarea_trailing_newlines() crash on Chrome 75+.
2019-06-18 11:38:51 +02:00
Hasan Ramezani
f038214d91
Fixed #29056 -- Fixed HTML5 validation of required SelectDateWidget.
...
placeholder is required for "select" with "required" attribute.
2019-05-08 12:46:30 +02:00