diff options
| author | Tom Christie | 2014-06-11 09:17:12 +0100 |
|---|---|---|
| committer | Tom Christie | 2014-06-11 09:17:12 +0100 |
| commit | 3dcc6585d21bddcb692ebbcb1985423e4ae6c086 (patch) | |
| tree | 19d59764f9573d96bfbb9f8bb90a5e504640b2e6 | |
| parent | e8ec81f5e985f9cc9f524f77ec23013be918b990 (diff) | |
| parent | be84f71bc906c926c9955a4cf47630b24461067d (diff) | |
| download | django-rest-framework-3dcc6585d21bddcb692ebbcb1985423e4ae6c086.tar.bz2 | |
Merge pull request #1632 from fletchowns/master
Fix #1614 - Corrected reference to serializers.CharField
| -rw-r--r-- | docs/api-guide/serializers.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/api-guide/serializers.md b/docs/api-guide/serializers.md index 0044f070..cedf1ff7 100644 --- a/docs/api-guide/serializers.md +++ b/docs/api-guide/serializers.md @@ -73,8 +73,8 @@ Sometimes when serializing objects, you may not want to represent everything exa If you need to customize the serialized value of a particular field, you can do this by creating a `transform_<fieldname>` method. For example if you needed to render some markdown from a text field: - description = serializers.TextField() - description_html = serializers.TextField(source='description', read_only=True) + description = serializers.CharField() + description_html = serializers.CharField(source='description', read_only=True) def transform_description_html(self, obj, value): from django.contrib.markup.templatetags.markup import markdown |
