mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-26 19:43:59 +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.
|
||||
|
||||
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