Fix Tutorial5 serializers.py typo

[Issue #N/A]

A slight typo at Tutorial5 causing an Exception "name 'models' is
not defined". A subtle one that can confuse Python/Django noobs
like me.
This commit is contained in:
Rodrigo Martell 2013-07-27 10:09:56 +10:00
parent 0e8a01e5de
commit 3a898a11f7

View File

@ -80,7 +80,7 @@ We can easily re-write our existing serializers to use hyperlinking.
highlight = serializers.HyperlinkedIdentityField(view_name='snippet-highlight', format='html') highlight = serializers.HyperlinkedIdentityField(view_name='snippet-highlight', format='html')
class Meta: class Meta:
model = models.Snippet model = Snippet
fields = ('url', 'highlight', 'owner', fields = ('url', 'highlight', 'owner',
'title', 'code', 'linenos', 'language', 'style') 'title', 'code', 'linenos', 'language', 'style')