mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Added missing pycon directives in various docs.
This commit is contained in:
@@ -89,11 +89,13 @@ Usage examples:
|
||||
A Python value passed to ``Coalesce`` on MySQL may be converted to an
|
||||
incorrect type unless explicitly cast to the correct database type:
|
||||
|
||||
>>> from django.db.models import DateTimeField
|
||||
>>> from django.db.models.functions import Cast, Coalesce
|
||||
>>> from django.utils import timezone
|
||||
>>> now = timezone.now()
|
||||
>>> Coalesce('updated', Cast(now, DateTimeField()))
|
||||
.. code-block:: pycon
|
||||
|
||||
>>> from django.db.models import DateTimeField
|
||||
>>> from django.db.models.functions import Cast, Coalesce
|
||||
>>> from django.utils import timezone
|
||||
>>> now = timezone.now()
|
||||
>>> Coalesce("updated", Cast(now, DateTimeField()))
|
||||
|
||||
``Collate``
|
||||
-----------
|
||||
|
||||
Reference in New Issue
Block a user