mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #33334 -- Alphabetized form and model fields in reference docs.
This commit is contained in:
committed by
Mariusz Felisiak
parent
e5a92d400a
commit
d75c387f46
@@ -1111,6 +1111,37 @@ when :attr:`~django.forms.Field.localize` is ``False`` or
|
||||
information on the difference between the two, see Python's documentation
|
||||
for the :mod:`decimal` module.
|
||||
|
||||
``GenericIPAddressField``
|
||||
-------------------------
|
||||
|
||||
.. class:: GenericIPAddressField(protocol='both', unpack_ipv4=False, **options)
|
||||
|
||||
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
|
||||
:class:`~django.forms.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.
|
||||
|
||||
.. attribute:: GenericIPAddressField.protocol
|
||||
|
||||
Limits valid inputs to the specified protocol.
|
||||
Accepted values are ``'both'`` (default), ``'IPv4'``
|
||||
or ``'IPv6'``. Matching is case insensitive.
|
||||
|
||||
.. attribute:: GenericIPAddressField.unpack_ipv4
|
||||
|
||||
Unpacks IPv4 mapped addresses like ``::ffff:192.0.2.1``.
|
||||
If this option is enabled that address would be unpacked to
|
||||
``192.0.2.1``. Default is disabled. Can only be used
|
||||
when ``protocol`` is set to ``'both'``.
|
||||
|
||||
If you allow for blank values, you have to allow for null values since blank
|
||||
values are stored as null.
|
||||
|
||||
``ImageField``
|
||||
--------------
|
||||
|
||||
@@ -1162,37 +1193,6 @@ The default form widget for this field is a :class:`~django.forms.NumberInput`
|
||||
when :attr:`~django.forms.Field.localize` is ``False`` or
|
||||
:class:`~django.forms.TextInput` otherwise.
|
||||
|
||||
``GenericIPAddressField``
|
||||
-------------------------
|
||||
|
||||
.. class:: GenericIPAddressField(protocol='both', unpack_ipv4=False, **options)
|
||||
|
||||
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
|
||||
:class:`~django.forms.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.
|
||||
|
||||
.. attribute:: GenericIPAddressField.protocol
|
||||
|
||||
Limits valid inputs to the specified protocol.
|
||||
Accepted values are ``'both'`` (default), ``'IPv4'``
|
||||
or ``'IPv6'``. Matching is case insensitive.
|
||||
|
||||
.. attribute:: GenericIPAddressField.unpack_ipv4
|
||||
|
||||
Unpacks IPv4 mapped addresses like ``::ffff:192.0.2.1``.
|
||||
If this option is enabled that address would be unpacked to
|
||||
``192.0.2.1``. Default is disabled. Can only be used
|
||||
when ``protocol`` is set to ``'both'``.
|
||||
|
||||
If you allow for blank values, you have to allow for null values since blank
|
||||
values are stored as null.
|
||||
|
||||
``JSONField``
|
||||
-------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user