1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #27369 -- Prevented widgets from being shared between form field instances.

This commit is contained in:
Michal Petrucha
2016-11-06 07:16:56 +01:00
committed by Tim Graham
parent 37809b891e
commit 09da1e79de
3 changed files with 18 additions and 2 deletions

View File

@@ -2867,7 +2867,7 @@ class FormFieldCallbackTests(SimpleTestCase):
fields = "__all__"
Form = modelform_factory(Person, form=BaseForm)
self.assertIs(Form.base_fields['name'].widget, widget)
self.assertIsInstance(Form.base_fields['name'].widget, forms.Textarea)
def test_factory_with_widget_argument(self):
""" Regression for #15315: modelform_factory should accept widgets