class GenericIPAddressField(protocol='both', unpack_ipv4=False, **options)
[source]
An IPv4 or IPv6 address, in string format (e.g. 192.0.2.30
or 2a02:42fe::4
). The default form widget for this field is a TextInput
.
The IPv6 address normalization follows RFC 4291#section-2.2 section 2.2, including using the IPv4 format suggested in paragraph 3 of that section, like ::ffff:192.0.2.0
. For example, 2001:0::0:01
would be normalized to 2001::1
, and ::ffff:0a0a:0a0a
to ::ffff:10.10.10.10
. All characters are converted to lowercase.
Please login to continue.