1
0
mirror of https://github.com/django/django.git synced 2025-06-07 12:39:12 +00:00

ticket #34699. reformatting documentation, still trying to understand the blacken message.

This commit is contained in:
wesley 2024-10-09 18:30:18 -04:00
parent 201fb15795
commit 1b9e03c2e8

View File

@ -680,10 +680,12 @@ Usage example:
>>> find_this_exp = Experiment.objects.annotate( >>> find_this_exp = Experiment.objects.annotate(
... trunc_start=TruncSecond("start_datetime") ... trunc_start=TruncSecond("start_datetime")
... ).filter(trunc_start__lte=start) ... ).filter(trunc_start__lte=start)
>>> find_this_exp.count() # We expect to find one result but 0 are found >>> find_this_exp.count()
... ...
0 0 # We expect to find one result but 0 are found
>>> start_adjusted = timezone.localtime(start).replace(tzinfo=zoneinfo.ZoneInfo(key='UTC')) >>> start_adjusted = timezone.localtime(start).replace(
... tzinfo=zoneinfo.ZoneInfo(key='UTC')
... )
>>> find_this_exp_adjusted = Experiment.objects.annotate( >>> find_this_exp_adjusted = Experiment.objects.annotate(
... trunc_start=TruncSecond("start_datetime") ... trunc_start=TruncSecond("start_datetime")
... ).filter(trunc_start__lte=start_adjusted) ... ).filter(trunc_start__lte=start_adjusted)