mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-27 08:29:59 +03:00
Add import to renderer_classes docs
### Description 1. **What** Adds an import statement to the docs for `renderer_classes` 2. **Why** The existing docs do not how what import is required to use `renderer_classes`, and finding the said import is not straightforward through the docs/SO/Google etc. ### Testing None. Not necessary
This commit is contained in:
parent
101aff6c43
commit
fcbcee066b
|
@ -152,6 +152,8 @@ A simple renderer that simply returns pre-rendered HTML. Unlike other renderers
|
||||||
|
|
||||||
An example of a view that uses `StaticHTMLRenderer`:
|
An example of a view that uses `StaticHTMLRenderer`:
|
||||||
|
|
||||||
|
from rest_framework.decorators import renderer_classes
|
||||||
|
|
||||||
@api_view(['GET'])
|
@api_view(['GET'])
|
||||||
@renderer_classes([StaticHTMLRenderer])
|
@renderer_classes([StaticHTMLRenderer])
|
||||||
def simple_html_view(request):
|
def simple_html_view(request):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user