Commit 3399158d by taras

RelatedField is function of serializer class

parent 14ae3012
...@@ -44,7 +44,7 @@ In order to explain the various types of relational fields, we'll use a couple o ...@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment