docs: add the import for caching

This commit is contained in:
Chris Guo 2019-11-01 14:27:43 +08:00
parent 12e9d40ed8
commit 2cfcf8ebec

View File

@ -17,6 +17,10 @@ other cache decorators such as [`cache_page`][page] and
[`vary_on_cookie`][cookie]. [`vary_on_cookie`][cookie].
```python ```python
from django.utils.decorators import method_decorator
from django.views.decorators.cache import cache_page
from django.views.decorators.vary import vary_on_cookie
from rest_framework.response import Response from rest_framework.response import Response
from rest_framework.views import APIView from rest_framework.views import APIView
from rest_framework import viewsets from rest_framework import viewsets