diff options
| author | Stefano Chiodino <StefanoChiodino@users.noreply.github.com> | 2018-10-03 00:17:23 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2018-10-02 19:17:23 -0400 |
| commit | 6de7f9ec60fbdc59797bc21803f16260bd203f04 (patch) | |
| tree | af6012d5445e55b6b42e1dc3625e8c8e43c641b6 /docs/ref | |
| parent | bc7e288ca9554ac1a0a19941302dea19df1acd21 (diff) | |
Fixed #29598 -- Deprecated FloatRangeField in favor of DecimalRangeField.
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/checks.txt | 2 | ||||
| -rw-r--r-- | docs/ref/contrib/postgres/fields.txt | 16 | ||||
| -rw-r--r-- | docs/ref/contrib/postgres/forms.txt | 15 |
3 files changed, 33 insertions, 0 deletions
diff --git a/docs/ref/checks.txt b/docs/ref/checks.txt index c8b13aa100..dd74639d33 100644 --- a/docs/ref/checks.txt +++ b/docs/ref/checks.txt @@ -168,6 +168,8 @@ Model fields check appeared in Django 1.10 and 1.11*. * **fields.E901**: ``CommaSeparatedIntegerField`` is removed except for support in historical migrations. +* **fields.W902**: ``FloatRangeField`` is deprecated and will be removed in + Django 3.1. File fields ~~~~~~~~~~~ diff --git a/docs/ref/contrib/postgres/fields.txt b/docs/ref/contrib/postgres/fields.txt index 0cac299f8d..bcab67d132 100644 --- a/docs/ref/contrib/postgres/fields.txt +++ b/docs/ref/contrib/postgres/fields.txt @@ -653,6 +653,18 @@ excluded; that is, ``[)``. returns a range in a canonical form that includes the lower bound and excludes the upper bound; that is ``[)``. +``DecimalRangeField`` +--------------------- + +.. class:: DecimalRangeField(**options) + + .. versionadded:: 2.2 + + Stores a range of floating point values. Based on a + :class:`~django.db.models.DecimalField`. Represented by a ``numrange`` in + the database and a :class:`~psycopg2:psycopg2.extras.NumericRange` in + Python. + ``FloatRangeField`` ------------------- @@ -662,6 +674,10 @@ excluded; that is, ``[)``. :class:`~django.db.models.FloatField`. Represented by a ``numrange`` in the database and a :class:`~psycopg2:psycopg2.extras.NumericRange` in Python. + .. deprecated:: 2.2 + + Use :class:`DecimalRangeField` instead. + ``DateTimeRangeField`` ---------------------- diff --git a/docs/ref/contrib/postgres/forms.txt b/docs/ref/contrib/postgres/forms.txt index 04adbc3a40..b5effb520c 100644 --- a/docs/ref/contrib/postgres/forms.txt +++ b/docs/ref/contrib/postgres/forms.txt @@ -193,6 +193,17 @@ not greater than the upper bound. All of these fields use :class:`~django.contrib.postgres.fields.IntegerRangeField` and :class:`~django.contrib.postgres.fields.BigIntegerRangeField`. +``DecimalRangeField`` +~~~~~~~~~~~~~~~~~~~~~ + +.. class:: DecimalRangeField + + .. versionadded:: 2.2 + + Based on :class:`~django.forms.DecimalField` and translates its input into + :class:`~psycopg2:psycopg2.extras.NumericRange`. Default for + :class:`~django.contrib.postgres.fields.DecimalRangeField`. + ``FloatRangeField`` ~~~~~~~~~~~~~~~~~~~ @@ -202,6 +213,10 @@ not greater than the upper bound. All of these fields use :class:`~psycopg2:psycopg2.extras.NumericRange`. Default for :class:`~django.contrib.postgres.fields.FloatRangeField`. + .. deprecated:: 2.2 + + Use :class:`DecimalRangeField` instead. + ``DateTimeRangeField`` ~~~~~~~~~~~~~~~~~~~~~~ |
