Replace IPAddressField with GenericIPAddressField

This commit is contained in:
arthur 2016-05-19 17:05:21 +02:00
parent e7df67e150
commit 0b923103f3
2 changed files with 3 additions and 3 deletions

View file

@ -181,8 +181,8 @@ _django_field_to_floppyform_widget = {
_create_widget(floppyforms.widgets.URLInput),
django.forms.fields.SlugField:
_create_widget(floppyforms.widgets.SlugInput),
#django.forms.fields.IPAddressField:
# _create_widget(floppyforms.widgets.IPAddressInput),
django.forms.fields.GenericIPAddressField:
_create_widget(floppyforms.widgets.IPAddressInput),
django.forms.fields.SplitDateTimeField:
_create_splitdatetimewidget(floppyforms.widgets.SplitDateTimeWidget),
}

View file

@ -490,7 +490,7 @@ class FieldWidgetTest(TestCase):
def test_ipaddress_field(self):
class MyForm(forms.ModelForm):
ipaddress = forms.IPAddressField()
ipaddress = forms.GenericIPAddressField()
form_class = modelform_factory(model=Post, form=MyForm, exclude=[])
widget = form_class().fields['ipaddress'].widget