aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Padilla2015-02-01 16:48:22 -0400
committerJosé Padilla2015-02-01 16:48:22 -0400
commitd6153a7fae2eb2ab8daad5b6cc10f151c9030eae (patch)
tree8404cead74012f401f7001dac1a837e02f6f7bd6
parenta89e05dc73e2c532372b1f9c51f38100f7f795f6 (diff)
parent9437d9b8eef9ef2b0f5f69257c8515416527c5a1 (diff)
downloaddjango-rest-framework-d6153a7fae2eb2ab8daad5b6cc10f151c9030eae.tar.bz2
Merge pull request #2497 from jpadilla/master
Fix base_template examples
-rw-r--r--docs/topics/3.0-announcement.md2
-rw-r--r--docs/tutorial/1-serialization.md2
2 files changed, 2 insertions, 2 deletions
diff --git a/docs/topics/3.0-announcement.md b/docs/topics/3.0-announcement.md
index 24e69c2d..59fe779c 100644
--- a/docs/topics/3.0-announcement.md
+++ b/docs/topics/3.0-announcement.md
@@ -826,7 +826,7 @@ The `style` keyword argument can be used to pass through additional information
For example, to use a `textarea` control instead of the default `input` control, you would use the following…
additional_notes = serializers.CharField(
- style={'base_template': 'text_area.html'}
+ style={'base_template': 'textarea.html'}
)
Similarly, to use a radio button control instead of the default `select` control, you would use the following…
diff --git a/docs/tutorial/1-serialization.md b/docs/tutorial/1-serialization.md
index 80e869ea..ceb23a02 100644
--- a/docs/tutorial/1-serialization.md
+++ b/docs/tutorial/1-serialization.md
@@ -97,7 +97,7 @@ The first thing we need to get started on our Web API is to provide a way of ser
class SnippetSerializer(serializers.Serializer):
pk = serializers.IntegerField(read_only=True)
title = serializers.CharField(required=False, allow_blank=True, max_length=100)
- code = serializers.CharField(style={'type': 'textarea'})
+ code = serializers.CharField(style={'base_template': 'textarea.html'})
linenos = serializers.BooleanField(required=False)
language = serializers.ChoiceField(choices=LANGUAGE_CHOICES, default='python')
style = serializers.ChoiceField(choices=STYLE_CHOICES, default='friendly')