mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Fixed #29598 -- Deprecated FloatRangeField in favor of DecimalRangeField.
This commit is contained in:
parent
bc7e288ca9
commit
6de7f9ec60
13 changed files with 126 additions and 42 deletions
|
@ -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``
|
||||
----------------------
|
||||
|
||||
|
|
|
@ -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``
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue