diff options
| author | eofs | 2013-02-14 13:21:54 +0200 |
|---|---|---|
| committer | eofs | 2013-02-14 13:21:54 +0200 |
| commit | 34145408cb73213c2f6c1e9ab53795e6d7e3a3f6 (patch) | |
| tree | 57e865e069667a83550a9c80bdb687987681cf75 /docs/tutorial | |
| parent | 84f059758ec4684df80bd8c811f8e71f27b14773 (diff) | |
| download | django-rest-framework-34145408cb73213c2f6c1e9ab53795e6d7e3a3f6.tar.bz2 | |
Missing imports added
Diffstat (limited to 'docs/tutorial')
| -rw-r--r-- | docs/tutorial/1-serialization.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/tutorial/1-serialization.md b/docs/tutorial/1-serialization.md index af5e8313..53d24136 100644 --- a/docs/tutorial/1-serialization.md +++ b/docs/tutorial/1-serialization.md @@ -109,7 +109,7 @@ The first thing we need to get started on our Web API is provide a way of serial from django.forms import widgets from rest_framework import serializers - from snippets.models import Snippet + from snippets.models import Snippet, LANGUAGE_CHOICES, STYLE_CHOICES class SnippetSerializer(serializers.Serializer): @@ -119,9 +119,9 @@ The first thing we need to get started on our Web API is provide a way of serial code = serializers.CharField(widget=widgets.Textarea, max_length=100000) linenos = serializers.BooleanField(required=False) - language = serializers.ChoiceField(choices=models.LANGUAGE_CHOICES, + language = serializers.ChoiceField(choices=LANGUAGE_CHOICES, default='python') - style = serializers.ChoiceField(choices=models.STYLE_CHOICES, + style = serializers.ChoiceField(choices=STYLE_CHOICES, default='friendly') def restore_object(self, attrs, instance=None): |
