1
0
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:
Mariusz Felisiak
2023-10-25 12:27:27 +02:00
committed by GitHub
parent ee104251c4
commit 718b32c691
11 changed files with 295 additions and 130 deletions

View File

@@ -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``
-----------