summaryrefslogtreecommitdiff
path: root/tests/forms_tests
Commit message (Collapse)AuthorAgeFilesLines
* Refs #32339 -- Fixed super() call in deprecated renderers.HEADmainCarlton Gibson2023-05-171-1/+9
| | | | | | | Missing function call `()` leads to: TypeError: descriptor '__init__' of 'super' object needs an argument Regression in b209518089131c6b4afd18b1d9c320ba3521c5ab.
* Fixed MultipleFileFieldTest.test_file_multiple_validation() test if Pillow ↵Mariusz Felisiak2023-05-041-0/+9
| | | | | isn't installed. Follow up to fb4c55d9ec4bb812a7fb91fa20510d91645e411b.
* Fixed CVE-2023-31047, Fixed #31710 -- Prevented potential bypass of ↵Mariusz Felisiak2023-05-033-1/+116
| | | | | | | | | 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>
* Fixed #34380 -- Allowed specifying a default URL scheme in forms.URLField.Coen van der Kamp2023-04-282-7/+34
| | | | This also deprecates "http" as the default scheme.
* Fixed #34488 -- Made ClearableFileInput preserve "Clear" checked attribute ↵Marcelo Galigniana2023-04-211-1/+4
| | | | when form is invalid.
* Fixed #34077 -- Added form field rendering.David Smith2023-03-243-0/+55
|
* Fixed #34424 -- Fixed SelectDateWidget crash for inputs raising OverflowError.Jure Slak2023-03-222-0/+14
|
* Refs #34434 -- Added assertion for cleaning 0-0-0 for forms.DateField.Jure Slak2023-03-221-0/+2
|
* Fixed #34388 -- Allowed using choice enumeration types directly on model and ↵T. Franzel2023-03-211-1/+2
| | | | form fields.
* Refs #33134, Refs #34077 -- Adjusted form rendering recursion test.David Smith2023-03-211-1/+1
| | | | | Adjusted recursion depth test to use str() rather than the form or field’s render() method.
* Fixed #34349 -- Fixed FormSet.empty_form crash when deleting extra forms is ↵Laurens Verhoeven2023-02-201-0/+1
| | | | disabled.
* Completed test coverage for django.forms.utils.Marcelo Galigniana2023-02-151-1/+18
|
* Refs #33476 -- Applied Black's 2023 stable style.David Smith2023-02-012-2/+0
| | | | | | | | 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
* Refs #32528 -- Simplified Media.merge().Nick Pope2023-01-191-1/+1
| | | | | | This avoids building up a second datastructure for the duplicate files warning case and simply flatten and strip duplicates if that case ever arises.
* Refs #34233 -- Used str.removeprefix()/removesuffix().Mariusz Felisiak2023-01-181-3/+1
|
* Refs #32339 -- Deprecated transitional form renderers.Mariusz Felisiak2023-01-181-0/+21
|
* Refs #32339 -- Changed default form and formset rendering style to div-based.Mariusz Felisiak2023-01-173-46/+3
| | | | | | | Per deprecation timeline. This also removes "django/forms/default.html" and "django/forms/formsets/default.html" templates.
* Refs #31026 -- Removed ability to return string when rendering ↵Mariusz Felisiak2023-01-171-55/+0
| | | | | | ErrorDict/ErrorList. Per deprecation timeline.
* Refs #31026 -- Removed BaseForm._html_output() per deprecation timeline.Mariusz Felisiak2023-01-171-134/+1
|
* Refs #32873 -- Removed settings.USE_L10N per deprecation timeline.Mariusz Felisiak2023-01-175-112/+52
|
* Refs #34119 -- Skipped ↵Mariusz Felisiak2022-11-281-1/+2
| | | | test_callable_default_hidden_widget_value_not_overridden when JSONField is not supported.
* Fixed #34119 -- Prevented callable default hidden widget value from being ↵David Sanders2022-11-181-0/+40
| | | | | | overridden. Thanks to Benjamin Rigaud for the report.
* Fixed #34148 -- Reverted "Fixed #32901 -- Optimized BaseForm.__getitem__()."Francesco Panico2022-11-181-0/+16
| | | | | | This reverts commit edde2a069929c93e37835dc3f7c9a229040058e2. Thanks Jan Pieter Waagmeester for the report.
* Used more augmented assignment statements.Nick Pope2022-10-311-1/+1
| | | | | | Identified using the following command: $ git grep -I '\(\<[_a-zA-Z0-9]\+\>\) *= *\1 *[-+/*^%&|<>@]'
* Fixed #33995 -- Fixed FormSet.empty_form crash when empty_permitted is ↵DevilsAutumn2022-09-091-0/+4
| | | | passed to form_kwargs.
* Fixed #33830 -- Fixed VariableDoesNotExist when rendering ClearableFileInput.Neeraj Kumar2022-08-251-0/+10
|
* Fixed #33876, Refs #32229 -- Made management forms render with div.html ↵Carlton Gibson2022-08-021-0/+11
| | | | | | template. Thanks to Claude Paroz for the report.
* Fixed warnings per flake8 5.0.0.Mariusz Felisiak2022-07-312-62/+80
|
* Refs #32339 -- Deprecated default.html form template.David Smith2022-05-173-93/+110
| | | | Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
* Fixed #32559 -- Added 'step_size’ to numeric form fields.Kapil Bansal2022-05-122-0/+29
| | | | Co-authored-by: Jacob Rief <jacob.rief@uibk.ac.at>
* Fixed #33622 -- Allowed customizing error messages for invalid number of forms.Marc Seguí Coll2022-05-101-0/+62
| | | | Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
* Fixed #32339 -- Added div.html form template.David Smith2022-05-052-0/+196
|
* Refs #32339 -- Allowed renderer to specify default form and formset templates.Carlton Gibson2022-04-272-2/+38
| | | | Co-authored-by: David Smith <smithdc@gmail.com>
* Fixed #33656 -- Fixed MultiWidget crash when compressed value is a tuple.L2022-04-261-0/+9
|
* Refs #32339 -- Added use_fieldset to Widget.David2022-03-3022-22/+429
|
* Reverted "Fixed forms_tests.tests.test_renderers with Jinja 3.1.0+."Mariusz Felisiak2022-03-261-24/+0
| | | This reverts commit 1d9d082acf6e152c06833bb9698f88d688b95e40.
* Fixed forms_tests.tests.test_renderers with Jinja 3.1.0+.Mariusz Felisiak2022-03-251-0/+24
| | | See https://github.com/pallets/jinja/pull/1621.
* Refs #32365 -- Removed internal uses of utils.timezone.utc alias.Carlton Gibson2022-03-241-4/+4
| | | | | Remaining test case ensures that uses of the alias are mapped canonically by the migration writer.
* Fixed #29490 -- Added support for object-based Media CSS and JS paths.Claude Paroz2022-02-101-0/+159
|
* Refs #33476 -- Refactored code to strictly match 88 characters line length.Mariusz Felisiak2022-02-0726-669/+1160
|
* Refs #33476 -- Reformatted code with Black.django-bot2022-02-0769-4072/+5893
|
* Refs #32559 -- Added selenium test for FloatField client-side validation.Carlton Gibson2022-02-033-1/+36
| | | | | | | 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 7ec2a21be15af5b2c7513482c3bcfdd1e12782ed.
* Refs #33476 -- Refactored problematic code before reformatting by Black.Mariusz Felisiak2022-02-031-2/+1
| | | | | | | | | | | | | | | | | In these cases Black produces unexpected results, e.g. def make_random_password( self, length=10, allowed_chars='abcdefghjkmnpqrstuvwxyz' 'ABCDEFGHJKLMNPQRSTUVWXYZ' '23456789', ): or cursor.execute(""" SELECT ... """, [table name], )
* Stopped including type="text/css" attributes for CSS link tags.Claude Paroz2022-01-221-57/+57
|
* Fixed #33419 -- Restored marking forms.Field.help_text as HTML safe.David2022-01-071-0/+35
| | | | | | Regression in 456466d932830b096d39806e291fe23ec5ed38d5. Thanks Matt Westcott for the report.
* Refs #31026 -- Changed @jinja2_tests imports to be relative.Jacob Walls2022-01-034-4/+7
|
* Refs #32339 -- Added rendering tests for forms with CheckboxSelectMultiple ↵David2021-12-231-0/+73
| | | | and SelectMultiple widgets.
* Refs #24121 -- Added __repr__() to BaseFormSet.Baptiste Mispelon2021-12-211-0/+63
|
* Fixed #33367 -- Fixed URLValidator crash in some edge cases.mendespedro2021-12-201-0/+4
|
* Fixed #33368 -- Fixed parse_duration() crash on invalid separators for ↵mendespedro2021-12-201-0/+2
| | | | decimal fractions.