Loading django/db/models/fields/__init__.py +2 −0 Original line number Diff line number Diff line Loading @@ -1312,6 +1312,8 @@ class IPAddressField(Field): description = _("IPv4 address") def __init__(self, *args, **kwargs): warnings.warn("IPAddressField has been deprecated. Use GenericIPAddressField instead.", PendingDeprecationWarning) kwargs['max_length'] = 15 Field.__init__(self, *args, **kwargs) Loading django/forms/fields.py +6 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ import datetime import os import re import sys import warnings from decimal import Decimal, DecimalException from io import BytesIO Loading Loading @@ -1144,6 +1145,11 @@ class SplitDateTimeField(MultiValueField): class IPAddressField(CharField): default_validators = [validators.validate_ipv4_address] def __init__(self, *args, **kwargs): warnings.warn("IPAddressField has been deprecated. Use GenericIPAddressField instead.", PendingDeprecationWarning) super(IPAddressField, self).__init__(*args, **kwargs) def to_python(self, value): if value in self.empty_values: return '' Loading docs/internals/deprecation.txt +2 −0 Original line number Diff line number Diff line Loading @@ -436,6 +436,8 @@ these changes. :ref:`initial SQL data<initial-sql>` in ``myapp/models/sql/``. Move your custom SQL files to ``myapp/sql/``. * The model and form ``IPAddressField`` will be removed. * FastCGI support via the ``runfcgi`` management command will be removed. Please deploy your project using WSGI. Loading docs/ref/forms/fields.txt +4 −0 Original line number Diff line number Diff line Loading @@ -657,6 +657,10 @@ For each field, we describe the default widget used if you don't specify .. class:: IPAddressField(**kwargs) .. deprecated:: 1.7 This field has been deprecated in favour of :class:`~django.forms.GenericIPAddressField`. * Default widget: :class:`TextInput` * Empty value: ``''`` (an empty string) * Normalizes to: A Unicode object. Loading docs/ref/models/fields.txt +4 −0 Original line number Diff line number Diff line Loading @@ -849,6 +849,10 @@ An integer. The default form widget for this field is a .. class:: IPAddressField([**options]) .. deprecated:: 1.7 This field has been deprecated in favour of :class:`~django.db.models.GenericIPAddressField`. An IP address, in string format (e.g. "192.0.2.30"). The default form widget for this field is a :class:`~django.forms.TextInput`. Loading Loading
django/db/models/fields/__init__.py +2 −0 Original line number Diff line number Diff line Loading @@ -1312,6 +1312,8 @@ class IPAddressField(Field): description = _("IPv4 address") def __init__(self, *args, **kwargs): warnings.warn("IPAddressField has been deprecated. Use GenericIPAddressField instead.", PendingDeprecationWarning) kwargs['max_length'] = 15 Field.__init__(self, *args, **kwargs) Loading
django/forms/fields.py +6 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ import datetime import os import re import sys import warnings from decimal import Decimal, DecimalException from io import BytesIO Loading Loading @@ -1144,6 +1145,11 @@ class SplitDateTimeField(MultiValueField): class IPAddressField(CharField): default_validators = [validators.validate_ipv4_address] def __init__(self, *args, **kwargs): warnings.warn("IPAddressField has been deprecated. Use GenericIPAddressField instead.", PendingDeprecationWarning) super(IPAddressField, self).__init__(*args, **kwargs) def to_python(self, value): if value in self.empty_values: return '' Loading
docs/internals/deprecation.txt +2 −0 Original line number Diff line number Diff line Loading @@ -436,6 +436,8 @@ these changes. :ref:`initial SQL data<initial-sql>` in ``myapp/models/sql/``. Move your custom SQL files to ``myapp/sql/``. * The model and form ``IPAddressField`` will be removed. * FastCGI support via the ``runfcgi`` management command will be removed. Please deploy your project using WSGI. Loading
docs/ref/forms/fields.txt +4 −0 Original line number Diff line number Diff line Loading @@ -657,6 +657,10 @@ For each field, we describe the default widget used if you don't specify .. class:: IPAddressField(**kwargs) .. deprecated:: 1.7 This field has been deprecated in favour of :class:`~django.forms.GenericIPAddressField`. * Default widget: :class:`TextInput` * Empty value: ``''`` (an empty string) * Normalizes to: A Unicode object. Loading
docs/ref/models/fields.txt +4 −0 Original line number Diff line number Diff line Loading @@ -849,6 +849,10 @@ An integer. The default form widget for this field is a .. class:: IPAddressField([**options]) .. deprecated:: 1.7 This field has been deprecated in favour of :class:`~django.db.models.GenericIPAddressField`. An IP address, in string format (e.g. "192.0.2.30"). The default form widget for this field is a :class:`~django.forms.TextInput`. Loading