mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-10 19:56:59 +03:00
snippets relationship in tutorial should be read_only
This commit is contained in:
parent
7d70e56ce3
commit
76956beab4
|
@ -85,7 +85,7 @@ We can easily re-write our existing serializers to use hyperlinking. In your `sn
|
|||
|
||||
|
||||
class UserSerializer(serializers.HyperlinkedModelSerializer):
|
||||
snippets = serializers.HyperlinkedRelatedField(many=True, view_name='snippet-detail')
|
||||
snippets = serializers.HyperlinkedRelatedField(many=True, view_name='snippet-detail', read_only=True)
|
||||
|
||||
class Meta:
|
||||
model = User
|
||||
|
|
Loading…
Reference in New Issue
Block a user