Lowercase the input

This commit is contained in:
Andrea Grandi 2015-03-26 18:14:53 +00:00
parent a0049dd489
commit 466575bee6

View File

@ -662,7 +662,7 @@ class IPAddressField(CharField):
}
def __init__(self, protocol='both', unpack_ipv4=False, **kwargs):
self.protocol = protocol
self.protocol = protocol.lower()
self.unpack_ipv4 = unpack_ipv4
super(IPAddressField, self).__init__(**kwargs)
validators, error_message = ip_address_validators(protocol, unpack_ipv4)