From 455c08432d94fde7a6cc4cc42b27c9000c533382 Mon Sep 17 00:00:00 2001 From: Pieter-Jan Busschaert Date: Fri, 13 Sep 2013 16:20:57 +0200 Subject: [PATCH] Tutorial part5: make snippet.owner a hyperlink too --- docs/tutorial/5-relationships-and-hyperlinked-apis.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorial/5-relationships-and-hyperlinked-apis.md b/docs/tutorial/5-relationships-and-hyperlinked-apis.md index 2cf44bf99..3b136d06d 100644 --- a/docs/tutorial/5-relationships-and-hyperlinked-apis.md +++ b/docs/tutorial/5-relationships-and-hyperlinked-apis.md @@ -76,7 +76,7 @@ The `HyperlinkedModelSerializer` has the following differences from `ModelSerial We can easily re-write our existing serializers to use hyperlinking. class SnippetSerializer(serializers.HyperlinkedModelSerializer): - owner = serializers.Field(source='owner.username') + owner = serializers.HyperlinkedIdentityField(view_name='user-detail') highlight = serializers.HyperlinkedIdentityField(view_name='snippet-highlight', format='html') class Meta: