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

Fixed #29279 -- Added renderer argument to ModelForm.

This commit is contained in:
Dan Watson
2018-03-29 10:09:00 -04:00
committed by Tim Graham
parent 058f607518
commit e163effecc
2 changed files with 7 additions and 1 deletions

View File

@@ -648,6 +648,10 @@ class ModelFormBaseTest(TestCase):
m1 = mf1.save(commit=False)
self.assertEqual(m1.mode, mode)
def test_renderer_kwarg(self):
custom = object()
self.assertIs(ProductForm(renderer=custom).renderer, custom)
def test_default_splitdatetime_field(self):
class PubForm(forms.ModelForm):
datetime_published = forms.SplitDateTimeField(required=False)