Ticket #20740: backport-1.6.x.diff

File backport-1.6.x.diff, 660 bytes (added by Jeff250, 2 years ago)

Additional patch required for 1.6.x backport

  • django/db/models/fields/__init__.py

    diff --git a/django/db/models/fields/__init__.py b/django/db/models/fields/__init__.py
    index 2212346..0b5e7d4 100644
    a b class GenericIPAddressField(Field): 
    11311131    def __init__(self, verbose_name=None, name=None, protocol='both',
    11321132                 unpack_ipv4=False, *args, **kwargs):
    11331133        self.unpack_ipv4 = unpack_ipv4
     1134        self.protocol = protocol
    11341135        self.default_validators, invalid_error_message = \
    11351136            validators.ip_address_validators(protocol, unpack_ipv4)
    11361137        self.default_error_messages['invalid'] = invalid_error_message
Back to Top