mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-29 21:14:01 +03:00
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:
parent
0e8a01e5de
commit
3a898a11f7
|
@ -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')
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user