Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 95e7ed4

Browse files
nattyg93sliverc
authored andcommitted
Clarify docs on controlling compound documents (#579)
1 parent 876892f commit 95e7ed4

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

‎AUTHORS‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ Mohammed Ali Zubair <mazg1493@gmail.com>
2323
Jason Housley <housleyjk@gmail.com>
2424
Beni Keller <beni@matraxi.ch>
2525
Stas S. <stas@nerd.ro>
26+
Nathanael Gordon <nathanael.l.gordon@gmail.com>

‎docs/usage.md‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -789,8 +789,9 @@ that are related to the primary resource.
789789

790790
To make a Compound Document,
791791
you need to modify your `ModelSerializer`.
792-
The two required additions are `included_resources`
793-
and `included_serializers`.
792+
`included_serializers` is required to inform DJA of what and how you would like
793+
to include.
794+
`included_resources` tells DJA what you want to include by default.
794795

795796
For example,
796797
suppose you are making an app to go on quests,
@@ -818,9 +819,6 @@ class QuestSerializer(serializers.ModelSerializer):
818819
included_resources = ['knight']
819820
```
820821

821-
`included_resources` informs DJA of **what** you would like to include.
822-
`included_serializers` tells DJA **how** you want to include it.
823-
824822
#### Performance improvements
825823

826824
Be aware that using included resources without any form of prefetching **WILL HURT PERFORMANCE** as it will introduce m\*(n+1) queries.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /