mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #34140 -- Reformatted code blocks in docs with blacken-docs.
This commit is contained in:
committed by
Mariusz Felisiak
parent
6015bab80e
commit
14459f80ee
@@ -29,8 +29,8 @@ objects:
|
||||
>>> from django.db.models import OuterRef
|
||||
>>> from django.db.models.functions import JSONObject
|
||||
>>> from django.contrib.postgres.expressions import ArraySubquery
|
||||
>>> books = Book.objects.filter(author=OuterRef('pk')).values(
|
||||
... json=JSONObject(title='title', pages='pages')
|
||||
>>> books = Book.objects.filter(author=OuterRef("pk")).values(
|
||||
... json=JSONObject(title="title", pages="pages")
|
||||
... )
|
||||
>>> author = Author.objects.annotate(books=ArraySubquery(books)).first()
|
||||
>>> author.books
|
||||
|
||||
Reference in New Issue
Block a user