Kaydet (Commit) 4ac1de31 authored tarafından Malcolm Tredinnick's avatar Malcolm Tredinnick

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
üst fedcabea
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment