summaryrefslogtreecommitdiff
path: root/docs/ref/models
diff options
context:
space:
mode:
authorShivam Durgbuns <47384634+shivamdurgbuns@users.noreply.github.com>2021-12-02 12:15:56 +0530
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2021-12-02 08:33:26 +0100
commitd75c387f46c55459a2daf071e5463bad0ad7dcbd (patch)
tree6c9d10b9af06f2be00f1793077d95c12273727de /docs/ref/models
parente5a92d400acb4ca6a8e1375d1ab8121f2c7220be (diff)
Fixed #33334 -- Alphabetized form and model fields in reference docs.
Diffstat (limited to 'docs/ref/models')
-rw-r--r--docs/ref/models/fields.txt62
1 files changed, 31 insertions, 31 deletions
diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt
index be7e2a8469..402306668b 100644
--- a/docs/ref/models/fields.txt
+++ b/docs/ref/models/fields.txt
@@ -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``
-------------