mirror of
https://github.com/jazzband/django-admin2.git
synced 2026-03-16 22:20:24 +00:00
Replace IPAddressField with GenericIPAddressField
This commit is contained in:
parent
e7df67e150
commit
0b923103f3
2 changed files with 3 additions and 3 deletions
|
|
@ -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),
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue