RelatedField is function of serializer class

This commit is contained in:
taras 2013-12-08 11:40:40 -05:00
parent 14ae301254
commit 3399158d62

View File

@ -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