0
0
mirror of https://github.com/django/django.git synced 2024-12-01 15:42:04 +01:00

Fixed #4686 -- Do not permit empty strings in IPAddressField. Should be fully

backwards compatible, but fixes an Oracle subtlety. Thanks, Ian Kelly.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5544 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Malcolm Tredinnick 2007-06-26 12:59:49 +00:00
parent fedcabea9e
commit 4ac1de31cd

View File

@ -800,6 +800,7 @@ class IntegerField(Field):
return super(IntegerField, self).formfield(**defaults)
class IPAddressField(Field):
empty_strings_allowed = False
def __init__(self, *args, **kwargs):
kwargs['maxlength'] = 15
Field.__init__(self, *args, **kwargs)