You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api-guide/renderers.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -135,15 +135,15 @@ See also: `StaticHTMLRenderer`
135
135
136
136
A simple renderer that simply returns pre-rendered HTML. Unlike other renderers, the data passed to the response object should be a string representing the content to be returned.
137
137
138
-
An example of a view that uses `TemplateHTMLRenderer`:
138
+
An example of a view that uses `StaticHTMLRenderer`:
139
139
140
140
@api_view(('GET',))
141
141
@renderer_classes((StaticHTMLRenderer,))
142
142
def simple_html_view(request):
143
143
data = '<html><body><h1>Hello, world</h1></body></html>'
144
144
return Response(data)
145
145
146
-
You can use `TemplateHTMLRenderer` either to return regular HTML pages using REST framework, or to return both HTML and API responses from a single endpoint.
146
+
You can use `StaticHTMLRenderer` either to return regular HTML pages using REST framework, or to return both HTML and API responses from a single endpoint.
0 commit comments