Skip to content

Commit 63063da

Browse files
authored
Update renderers documentation example (#9362)
1 parent 085b7e1 commit 63063da

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/api-guide/renderers.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ By default this will include the following keys: `view`, `request`, `response`,
283283

284284
The following is an example plaintext renderer that will return a response with the `data` parameter as the content of the response.
285285

286-
from django.utils.encoding import smart_text
286+
from django.utils.encoding import smart_str
287287
from rest_framework import renderers
288288

289289

@@ -292,7 +292,7 @@ The following is an example plaintext renderer that will return a response with
292292
format = 'txt'
293293

294294
def render(self, data, accepted_media_type=None, renderer_context=None):
295-
return smart_text(data, encoding=self.charset)
295+
return smart_str(data, encoding=self.charset)
296296

297297
## Setting the character set
298298

0 commit comments

Comments
 (0)