mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-02-03 13:14:30 +03:00
correcting "it's" to "its" in Tutorial 1
This commit is contained in:
parent
fdeef89ba7
commit
b0bc79ed4d
|
@ -198,7 +198,7 @@ Open the file `snippets/serializers.py` again, and replace the `SnippetSerialize
|
||||||
model = Snippet
|
model = Snippet
|
||||||
fields = ('id', 'title', 'code', 'linenos', 'language', 'style')
|
fields = ('id', 'title', 'code', 'linenos', 'language', 'style')
|
||||||
|
|
||||||
One nice property that serializers have is that you can inspect all the fields in a serializer instance, by printing it's representation. Open the Django shell with `python manage.py shell`, then try the following:
|
One nice property that serializers have is that you can inspect all the fields in a serializer instance, by printing its representation. Open the Django shell with `python manage.py shell`, then try the following:
|
||||||
|
|
||||||
>>> from snippets.serializers import SnippetSerializer
|
>>> from snippets.serializers import SnippetSerializer
|
||||||
>>> serializer = SnippetSerializer()
|
>>> serializer = SnippetSerializer()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user