mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Fixed #34140 -- Reformatted code blocks in docs with blacken-docs.
This commit is contained in:
parent
6015bab80e
commit
14459f80ee
193 changed files with 5797 additions and 4481 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue