Josef Rousek
aaecf038ca
Fixed #27370 -- Prevented Select widget from using 'required' with a non-empty first value.
2016-12-28 10:45:22 -05:00
Preston Timmons
b52c73008a
Fixed #15667 -- Added template-based widget rendering.
...
Thanks Carl Meyer and Tim Graham for contributing to the patch.
2016-12-27 17:50:10 -05:00
Illia Volochii
4a51ba228b
Fixed #27642 -- Made forms.utils.flatatt() omit 'None' values from attrs.
2016-12-27 09:42:17 -05:00
Tim Graham
b5f0b3478d
Fixed #27579 -- Added aliases for Python 3's assertion names in SimpleTestCase.
2016-12-07 17:42:31 -05:00
Claude Paroz
d49551bc26
Fixed #27119 -- Cached BaseFormSet.management_form property
...
Thanks Tim Graham for the review.
2016-12-01 20:17:25 +01:00
Diego Martín
abd434059e
Fixed #27250 -- Removed 'for ="..."' from CheckboxSelectMultiple's <label>.
2016-11-22 11:48:37 -05:00
Ramin Farajpour Cami
967be82443
Fixed E305 flake8 warnings.
2016-11-14 12:30:46 -05:00
Kenneth Veldman
8618a7eaa1
Fixed #27431 -- Prevented disabled form fields from appearing as changed.
2016-11-11 06:57:57 -05:00
za
321e94fa41
Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings.
2016-11-10 21:30:21 -05:00
Michal Petrucha
09da1e79de
Fixed #27369 -- Prevented widgets from being shared between form field instances.
2016-11-06 07:16:56 +01:00
Tim Graham
87c5e7efeb
Refs #27186 -- Fixed model form default fallback for CheckboxSelectMultiple.
2016-09-30 14:49:50 -04:00
Tim Graham
3507d4e773
Fixed #27186 -- Fixed model form default fallback for MultiWidget, FileInput, SplitDateTimeWidget, SelectDateWidget, and SplitArrayWidget.
...
Thanks Matt Westcott for the review.
2016-09-22 12:20:58 -04:00
Jon Dufresne
2c716c1dc7
Fixed #27256 -- Changed Select widget's selected attribute to use HTML5 boolean syntax.
2016-09-21 15:12:13 -07:00
Tim Graham
8119b679eb
Refs #27025 -- Fixed "invalid escape sequence" warnings in Python 3.6.
...
http://bugs.python.org/issue27364
2016-09-17 15:44:06 -04:00
Tim Graham
dab653cadc
Organized forms_tests test_regressions.py.
2016-09-09 08:55:29 -04:00
Jon Dufresne
f5c6d3c8d9
Fixed #27068 -- Unified form field initial data retrieval.
2016-08-18 17:55:47 -07:00
Jon Dufresne
fab46ce6f5
Fixed #27037 -- Prevented required attribute on ClearableFileInput when initial data exists.
2016-08-12 13:59:01 -04:00
Tim Graham
176f27049e
Updated an import per isort.
2016-08-10 15:27:31 -04:00
Andrew Nester
f5c6295797
Fixed #26844 -- Made formset's validate_min validation ignore empty forms.
2016-08-10 13:03:04 -04:00
Marcin Nowak
74bb013cc1
Fixed #26905 -- Allowed using MultiValueDict-like objects as form data.
2016-08-09 19:46:24 -04:00
Claude Paroz
3569ba0333
Fixed #27015 -- Prevented HTML-invalid minlength/maxlength on hidden inputs
2016-08-06 10:22:17 +02:00
Jon Dufresne
50e299dbfb
Fixed #26928 -- Changed forms' checked attribute to HTML5 boolean style.
2016-08-04 19:16:54 -04:00
Jon Dufresne
ac3aaaa740
Fixed #26927 -- Made subwidget iteration pass disabled and required attributes.
2016-08-01 10:36:17 -04:00
Jon Dufresne
caa006f327
Removed unnecessary coerce to list in forms_tests.
2016-07-22 07:46:45 -04:00
Dmitry Dygalo
ca32979cdc
Made miscellaneous code cleanups
2016-07-21 10:08:19 -04:00
Priy
a7b5dfd170
Fixed #26821 -- Fixed forms.Email/URLField crash on None value.
2016-07-14 12:59:14 -04:00
Jon Dufresne
76e19da5b0
Fixed #26890 -- Fixed IntegerField crash on Unicode numbers.
2016-07-14 09:38:57 -04:00
Tim Graham
c9ae09addf
Replaced use of TestCase.fail() with assertRaises().
...
Also removed try/except/fail antipattern that hides exceptions.
2016-06-28 11:21:26 -04:00
Jon Dufresne
4f336f6652
Fixed #26747 -- Used more specific assertions in the Django test suite.
2016-06-16 14:19:18 -04:00
Tim Graham
55c3133df8
Simplified a ClearableFileInput test.
2016-05-14 10:31:32 -04:00
Tim Graham
86573861a9
Refs #15667 -- Removed choices argument from some RendererMixin methods.
...
RendererMixin will soon be removed but this removal and the corresponding
test changes stand on their own.
2016-04-28 18:48:52 -04:00
David Sanders
218175b09d
Fixed #26534 -- Fixed boolean form fields has_changed() with hidden input.
2016-04-24 15:06:30 -04:00
Tim Graham
859eeaa0f0
Fixed #26533 -- Renamed Widget._format_value() to format_value().
2016-04-23 13:15:45 -04:00
Loïc Bistuer
6f5fcfc6d2
Moved declaration of test form inside the relevant test for clarity.
2016-04-22 09:38:47 +07:00
Loïc Bistuer
a885bca1df
Fixed #26528 -- Allowed any iterable (e.g. tuple) as validators kwarg for form/model fields.
2016-04-22 09:38:47 +07:00
Jon Dufresne
ec6121693f
Fixed #22383 -- Added support for HTML5 required attribute on required form fields.
2016-04-21 19:16:38 -04:00
Jon Dufresne
500e5a6886
Fixed #26516 -- Added minlength attribute when forms.CharField.min_length is set.
2016-04-19 08:54:27 -04:00
Tim Graham
3cb63b0e47
Refs #26502 -- Added choices to Form.__getitem__() KeyError message.
2016-04-14 09:15:09 -04:00
Berker Peksag
0247c9b08f
Split form's test_fields.py into different files.
2016-04-11 12:48:23 -04:00
Tim Graham
92053acbb9
Fixed E128 flake8 warnings in tests/.
2016-04-08 10:12:33 -04:00
Tim Graham
2cd2d18851
Fixed W503 flake8 warnings.
2016-04-04 17:14:26 -04:00
Jon Dufresne
e862296960
Removed duplicate definition of ChoiceFormSet.
2016-03-25 07:37:21 -04:00
Akshesh
44c0ecdd92
Fixed #25364 -- Added generic way to test on all browsers supported by selenium.
...
Browser names should be passed as a comma separated list to the --selenium flag.
Thanks Tim Graham, Simon Charette and Moritz Sichert for review and discussion.
2016-03-15 13:10:32 -04:00
Jon Dufresne
b412681359
Fixed #26267 -- Fixed BoundField to reallow slices of subwidgets.
2016-02-24 07:02:51 -05:00
Berker Peksag
043383e3f3
Fixed #24727 -- Prevented ClearableFileInput from masking exceptions on Python 2
2016-02-15 22:51:46 +02:00
Alexey Kotlyarov
b59f963ad2
Fixed #26212 -- Made forms.FileField and translation.lazy_number() picklable.
2016-02-15 11:44:29 -05:00
jpic
926e90132d
Fixed #25731 -- Removed unused choices kwarg for Select.render()
2016-02-02 18:03:19 -05:00
Hasan
253adc2b8a
Refs #26022 -- Used context manager version of assertRaisesMessage in tests.
2016-01-29 13:03:39 -05:00
Hasan
3d0dcd7f5a
Refs #26022 -- Used context manager version of assertRaises in tests.
2016-01-29 12:32:18 -05:00
Tim Graham
04564eb74d
Fixed #26129 -- Made invalid forms display initial values of disabled fields.
2016-01-28 18:43:48 -05:00
userimack
60586dd737
Fixed #26125 -- Fixed E731 flake warnings.
2016-01-25 14:23:43 -05:00
Alexander Gaevsky
956cde8004
Fixed #26104 -- Fixed TypeError when passing number to forms.DurationField.
2016-01-22 16:24:49 -05:00
Luke Plant
77974a684a
Changed `action="."` to `action=""` in tests and docs.
...
`action="."` strips query parameters from the URL which is not usually what
you want. Copy-paste coding of these examples could lead to difficult to
track down bugs or even data loss if the query parameter was meant to alter
the scope of a form's POST request.
2016-01-21 13:59:15 -05:00
Marten Kenbeek
16411b8400
Fixed #26013 -- Moved django.core.urlresolvers to django.urls.
...
Thanks to Tim Graham for the review.
2015-12-31 14:21:29 -05:00
Raphaël Hertzog
e0f370364a
Fixed #26017 -- Removed a dependency on the name of the top-level tests directory.
2015-12-30 12:50:21 -05:00
Claude Paroz
d91cc25a2a
Fixed #25942 -- Fixed TypedChoiceField.has_changed with nullable field
...
This fixes a regression introduced by 871440361
.
2015-12-17 15:38:19 +01:00
Josh Soref
93452a70e8
Fixed many spelling mistakes in code, comments, and docs.
2015-12-03 12:48:24 -05:00
Marti Raudsepp
1155843a41
Fixed #25683 -- Allowed ModelChoiceField(queryset=...) to accept Managers.
...
This fixes a regression from refs #25496 .
2015-11-09 12:42:36 -05:00
Tim Graham
9c5e272860
Fixed #25550 -- Deprecated direct assignment to the reverse side of a related set.
2015-10-27 07:57:15 -04:00
Claude Paroz
f59a0401e5
Fixed #25567 -- Removed obsolete MEDIA_URL fallback in Media.absolute_path
2015-10-19 15:39:35 +02:00
Tim Graham
a3fe4addcb
Refs #23162 -- Removed forms.Field._has_changed() method.
...
Per deprecation timeline.
2015-09-23 19:31:10 -04:00
Tim Graham
b6ea1961eb
Refs #23151 -- Removed RegexField.error_message per deprecation timeline.
2015-09-23 19:31:10 -04:00
Tim Graham
7cb3a48843
Fixed #25410 -- Fixed empty ClearableFileInput crash on Python 2.
...
Reverted "Fixes #24727 -- Prevented ClearableFileInput from masking
exceptions on Python 2" and added a regression test.
This reverts commit 5c412dd8a7
.
2015-09-23 10:26:19 -04:00
Moritz Sichert
8550161e53
Refs #25294 -- Moved BoundField to django.forms.boundfield.
2015-09-16 14:43:38 -04:00
Moritz Sichert
535809e121
Fixed #25294 -- Allowed custom BoundFields on forms.
2015-09-16 10:18:07 -04:00
Dražen Odobašić
b1e33ceced
Fixed #23395 -- Limited line lengths to 119 characters.
2015-09-12 11:40:50 -04:00
Moritz Sichert
dae81c6ec6
Refs #25300 -- Fixed reference to TextInput in a test.
2015-09-09 09:28:48 -04:00
Preston Timmons
4c30fa905d
Rewrote form widget tests as proper unittests.
...
This is preparation for landing the template-based widget rendering
patch and goes a long way to making these tests more useful for future
development. The old doctest heritage is strong here.
2015-08-31 23:03:55 -05:00
Maxime Lorant
5153a3bfdc
Fixed #25331 -- Removed trailing blank lines in docstrings.
2015-08-31 17:37:21 -04:00
Maxime Lorant
7d60659e22
Fixed #25300 -- Added unit tests for BoundField.id_for_label
2015-08-22 10:08:59 -04:00
Flavio Curella
c2e70f0265
Fixed #21127 -- Started deprecation toward requiring on_delete for ForeignKey/OneToOneField
2015-07-27 18:28:13 -04:00
Tim Graham
b60375d4bb
Fixed #25129 -- Made model instance defaults work with migrations (refs #24919 ).
2015-07-21 09:19:40 -04:00
Tim Graham
04e69598de
Refs #24919 -- Made test models serializable for migrations.
2015-07-21 09:19:40 -04:00
Edward Henderson
f8cc464452
Fixed #16501 -- Added an allow_unicode parameter to SlugField.
...
Thanks Flavio Curella and Berker Peksag for the initial patch.
2015-07-17 13:48:58 -04:00
Claude Paroz
1ef4aeab40
Fixed #25078 -- Added support for disabled form fields
...
Thanks Keryn Knight and Tim Graham for the reviews.
2015-07-16 19:36:56 +02:00
Tim Graham
b356dc4e07
Refs #25085 -- Used more specific assertion in widget test.
2015-07-14 12:17:34 -04:00
Eric Carrillo
8ee6a3f1a8
Fixed #25085 -- Overrode Select widget's __deepcopy__()
2015-07-14 11:56:08 -04:00
Yosuke Yasuda
a2b999dfca
Fixed #25108 -- Fixed a test which failed on Pillow 2.9+
2015-07-13 14:58:44 -04:00
Tim Graham
e7c6a2cf9f
Refs #4960 -- Fixed selenium test failures for CharField strip changes.
2015-07-06 08:52:50 -04:00
Curtis
11cac1bd8e
Fixed #4960 -- Added "strip" option to CharField
2015-07-01 17:47:05 -04:00
Tim Graham
aaacaeb096
Renamed RemovedInDjangoXYWarnings for new roadmap.
...
Forwardport of ae1d663b79
from stable/1.8.x plus more.
2015-06-24 16:08:20 -04:00
Andriy Sokolovskiy
cf6ce279c7
Fixed #24948 -- Fixed crash when uploading bitmap images in forms.ImageField
2015-06-16 14:37:58 -04:00
Markus Amalthea Magnuson
1884bf8e8e
Fixed #12437 -- Added css_classes to Form._html_output()
2015-06-06 19:23:06 -04:00
Sergei Maertens
238e2ac369
Fixed #18166 -- Added form_kwargs support to formsets.
...
By specifying form_kwargs when instantiating the formset, or overriding
the `get_form_kwargs` method on a formset class, you can pass extra
keyword arguments to the underlying `Form` instances.
Includes tests and documentation update.
2015-06-04 15:13:55 +02:00
Paweł Marczewski
4df7e8483b
Fixed #24788 -- Allowed Forms to specify a prefix at the class level.
2015-05-25 20:23:31 -04:00
Claude Paroz
97e1160be5
Refs #9230 -- Added complementary tests for widget iterations
2015-05-22 09:25:37 +02:00
Simon Charette
be67400b47
Refs #24652 -- Used SimpleTestCase where appropriate.
2015-05-20 13:46:13 -04:00
wdmgsm
4dcc649341
Fixed #24497 -- Added Widget.supports_microseconds attribute
2015-05-06 07:13:00 -04:00
Antonio Garcia-Dominguez
5c412dd8a7
Fixes #24727 -- Prevented ClearableFileInput from masking exceptions on Python 2
2015-05-04 09:44:18 -04:00
Alasdair Nicol
eaeea6f947
Fixed #24714 -- Used more specific assertions than assertEqual in tests.
2015-04-28 09:31:04 -04:00
Alasdair Nicol
d91321e8be
Used assertIsInstance in tests.
2015-04-27 08:40:36 -04:00
Claude Paroz
2112b7d789
Adapted form regression test to new translations
2015-04-01 19:51:50 +02:00
Moritz Sichert
1f2abf784a
Fixed #24469 -- Refined escaping of Django's form elements in non-Django templates.
2015-03-27 19:46:20 -04:00
Thomas Tanner
28986da4ca
Fixed #5986 -- Added ability to customize order of Form fields
2015-03-16 09:12:57 -04:00
Claude Paroz
8714403614
Fixed #24428 -- Fixed has_changed for fields with coercion
...
Thanks Carsten Fuchs for the report.
2015-03-05 09:00:13 +01:00
Claude Paroz
4b8979e477
Fixed #17401 -- Made SelectDateWidget.render reflect wrong value
...
Thanks Marcin Wrobel for the initial patch.
2015-03-01 21:37:52 +01:00
Claude Paroz
8a9f39d2b3
Removed binary input test line
...
That line was inconveniently introduced by the committer (me) in
3b966c2b73
. Sorry!
2015-02-27 15:44:06 +01:00
Jon Dufresne
3b966c2b73
Fixed #24229 -- Changed IntegerField to clean floats representing integers
2015-02-27 12:23:21 +01:00
Michael Angeletti
65441bbdb0
Fixed #24391 -- Made BoundField.value() cache callable values.
2015-02-24 19:50:55 -05:00
Aymeric Augustin
934400759d
Guaranteed removal of temporary files during tests.
...
Dropped the DJANGO_TEST_TEMP_DIR environment variable.
Before this change, proper removal depended on the developer passing
dir=os.environ['DJANGO_TEST_TMP_DIR'] to tempfile functions.
2015-02-23 16:55:26 +01:00