mirror of
https://github.com/django/django.git
synced 2025-08-02 18:13:02 +00:00
Fixed #30446 -- Resolved Value.output_field for stdlib types.
This required implementing a limited form of dynamic dispatch to combine expressions with numerical output. Refs #26355 should eventually provide a better interface for that.
This commit is contained in:
parent
d08e6f55e3
commit
1e38f1191d
10 changed files with 122 additions and 39 deletions
|
@ -233,6 +233,15 @@ Models
|
|||
* The ``of`` argument of :meth:`.QuerySet.select_for_update()` is now allowed
|
||||
on MySQL 8.0.1+.
|
||||
|
||||
* :class:`Value() <django.db.models.Value>` expression now
|
||||
automatically resolves its ``output_field`` to the appropriate
|
||||
:class:`Field <django.db.models.Field>` subclass based on the type of
|
||||
it's provided ``value`` for :py:class:`bool`, :py:class:`bytes`,
|
||||
:py:class:`float`, :py:class:`int`, :py:class:`str`,
|
||||
:py:class:`datetime.date`, :py:class:`datetime.datetime`,
|
||||
:py:class:`datetime.time`, :py:class:`datetime.timedelta`,
|
||||
:py:class:`decimal.Decimal`, and :py:class:`uuid.UUID` instances.
|
||||
|
||||
Requests and Responses
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue