(self, protocol='both', **kwargs)
| 862 | } |
| 863 | |
| 864 | def __init__(self, protocol='both', **kwargs): |
| 865 | self.protocol = protocol.lower() |
| 866 | self.unpack_ipv4 = (self.protocol == 'both') |
| 867 | super().__init__(**kwargs) |
| 868 | validators = ip_address_validators(protocol, self.unpack_ipv4) |
| 869 | self.validators.extend(validators) |
| 870 | |
| 871 | def to_internal_value(self, data): |
| 872 | if not isinstance(data, str): |
nothing calls this directly
no test coverage detected