mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-23 10:03:57 +03:00
RelatedField is function of serializer class
This commit is contained in:
parent
14ae301254
commit
3399158d62
|
@ -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.
|
||||
|
||||
class AlbumSerializer(serializers.ModelSerializer):
|
||||
tracks = RelatedField(many=True)
|
||||
tracks = serializers.RelatedField(many=True)
|
||||
|
||||
class Meta:
|
||||
model = Album
|
||||
|
|
Loading…
Reference in New Issue
Block a user