Skip to content

Commit 374c0d4

Browse files
authored
Punctuation fix (#7488)
* Punctuation fix * more punctuation
1 parent 355afcf commit 374c0d4

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docs/api-guide/relations.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ In order to explain the various types of relational fields, we'll use a couple o
5656

5757
`StringRelatedField` may be used to represent the target of the relationship using its `__str__` method.
5858

59-
For example, the following serializer.
59+
For example, the following serializer:
6060

6161
class AlbumSerializer(serializers.ModelSerializer):
6262
tracks = serializers.StringRelatedField(many=True)
@@ -65,7 +65,7 @@ For example, the following serializer.
6565
model = Album
6666
fields = ['album_name', 'artist', 'tracks']
6767

68-
Would serialize to the following representation.
68+
Would serialize to the following representation:
6969

7070
{
7171
'album_name': 'Things We Lost In The Fire',
@@ -291,7 +291,7 @@ Would serialize to a nested representation like this:
291291

292292
## Writable nested serializers
293293

294-
By default nested serializers are read-only. If you want to support write-operations to a nested serializer field you'll need to create `create()` and/or `update()` methods in order to explicitly specify how the child relationships should be saved.
294+
By default nested serializers are read-only. If you want to support write-operations to a nested serializer field you'll need to create `create()` and/or `update()` methods in order to explicitly specify how the child relationships should be saved:
295295

296296
class TrackSerializer(serializers.ModelSerializer):
297297
class Meta:
@@ -343,7 +343,7 @@ To provide a dynamic queryset based on the `context`, you can also override `.ge
343343

344344
## Example
345345

346-
For example, we could define a relational field to serialize a track to a custom string representation, using its ordering, title, and duration.
346+
For example, we could define a relational field to serialize a track to a custom string representation, using its ordering, title, and duration:
347347

348348
import time
349349

@@ -359,7 +359,7 @@ For example, we could define a relational field to serialize a track to a custom
359359
model = Album
360360
fields = ['album_name', 'artist', 'tracks']
361361

362-
This custom field would then serialize to the following representation.
362+
This custom field would then serialize to the following representation:
363363

364364
{
365365
'album_name': 'Sometimes I Wish We Were an Eagle',
@@ -535,7 +535,7 @@ And the following two models, which may have associated tags:
535535
text = models.CharField(max_length=1000)
536536
tags = GenericRelation(TaggedItem)
537537

538-
We could define a custom field that could be used to serialize tagged instances, using the type of each instance to determine how it should be serialized.
538+
We could define a custom field that could be used to serialize tagged instances, using the type of each instance to determine how it should be serialized:
539539

540540
class TaggedObjectRelatedField(serializers.RelatedField):
541541
"""

0 commit comments

Comments
 (0)