mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #25774 -- Refactor datetime expressions into public API
This commit is contained in:
@@ -443,6 +443,13 @@ Models
|
||||
* A proxy model may now inherit multiple proxy models that share a common
|
||||
non-abstract parent class.
|
||||
|
||||
* Added :class:`~django.db.models.functions.datetime.Extract` functions
|
||||
to extract datetime components as integers, such as year and hour.
|
||||
|
||||
* Added :class:`~django.db.models.functions.datetime.Trunc` functions to
|
||||
truncate a date or datetime to a significant component. They enable queries
|
||||
like sales-per-day or sales-per-hour.
|
||||
|
||||
* ``Model.__init__()`` now sets values of virtual fields from its keyword
|
||||
arguments.
|
||||
|
||||
@@ -900,6 +907,10 @@ Miscellaneous
|
||||
989 characters. If you were counting on a limited length, truncate the subject
|
||||
yourself.
|
||||
|
||||
* Private expressions ``django.db.models.expressions.Date`` and ``DateTime``
|
||||
are removed. The new :class:`~django.db.models.functions.datetime.Trunc`
|
||||
expressions provide the same functionality.
|
||||
|
||||
.. _deprecated-features-1.10:
|
||||
|
||||
Features deprecated in 1.10
|
||||
|
||||
Reference in New Issue
Block a user