mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-27 03:54:01 +03:00
Merge pull request #1275 from qooleot/master
RelatedField is function of serializer class
This commit is contained in:
commit
5eca31d161
|
@ -44,7 +44,7 @@ In order to explain the various types of relational fields, we'll use a couple o
|
||||||
For example, the following serializer.
|
For example, the following serializer.
|
||||||
|
|
||||||
class AlbumSerializer(serializers.ModelSerializer):
|
class AlbumSerializer(serializers.ModelSerializer):
|
||||||
tracks = RelatedField(many=True)
|
tracks = serializers.RelatedField(many=True)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Album
|
model = Album
|
||||||
|
|
Loading…
Reference in New Issue
Block a user