File: views.py

package info (click to toggle)
drf-extensions 0.8.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,308 kB
  • sloc: python: 7,421; makefile: 11
file content (10 lines) | stat: -rw-r--r-- 289 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
from rest_framework import views
from rest_framework.response import Response

from rest_framework_extensions.cache.decorators import cache_response


class HelloView(views.APIView):
    @cache_response()
    def get(self, request, *args, **kwargs):
        return Response('Hello world')