Skip to content

Commit

Permalink
Merge pull request #3853 from jpadilla/issue/3850
Browse files Browse the repository at this point in the history
Fix broken link format
  • Loading branch information
jpadilla committed Jan 20, 2016
2 parents 328000f + 99a61d7 commit 06dd55a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/api-guide/serializers.md
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ This manager class now more nicely encapsulates that user instances and profile
has_support_contract=validated_data['profile']['has_support_contract']
)

For more details on this approach see the Django documentation on [model managers](model-managers), and [this blogpost on using model and manager classes](encapsulation-blogpost).
For more details on this approach see the Django documentation on [model managers][model-managers], and [this blogpost on using model and manager classes][encapsulation-blogpost].

## Dealing with multiple objects

Expand Down Expand Up @@ -774,7 +774,7 @@ To support multiple updates you'll need to do so explicitly. When writing your m
* How should insertions be handled? Are they invalid, or do they create new objects?
* How should removals be handled? Do they imply object deletion, or removing a relationship? Should they be silently ignored, or are they invalid?
* How should ordering be handled? Does changing the position of two items imply any state change or is it ignored?

You will need to add an explicit `id` field to the instance serializer. The default implicitly-generated `id` field is marked as `read_only`. This causes it to be removed on updates. Once you declare it explicitly, it will be available in the list serializer's `update` method.

Here's an example of how you might choose to implement multiple updates:
Expand Down Expand Up @@ -808,7 +808,7 @@ Here's an example of how you might choose to implement multiple updates:

...
id = serializers.IntegerField(required=False)

class Meta:
list_serializer_class = BookListSerializer

Expand Down

0 comments on commit 06dd55a

Please sign in to comment.