[1.6.x] Fixed backport of #20740

This commit is contained in:
Tim Graham 2013-07-12 18:00:09 -04:00
parent 45fab74561
commit 7f210563ab
1 changed files with 1 additions and 0 deletions

View File

@ -1131,6 +1131,7 @@ class GenericIPAddressField(Field):
def __init__(self, verbose_name=None, name=None, protocol='both',
unpack_ipv4=False, *args, **kwargs):
self.unpack_ipv4 = unpack_ipv4
self.protocol = protocol
self.default_validators, invalid_error_message = \
validators.ip_address_validators(protocol, unpack_ipv4)
self.default_error_messages['invalid'] = invalid_error_message