Fix the attr error

This commit is contained in:
Chris Guo 2019-11-01 14:26:20 +08:00
parent f98b6f3577
commit 12e9d40ed8

View File

@ -21,7 +21,8 @@ from rest_framework.response import Response
from rest_framework.views import APIView
from rest_framework import viewsets
class UserViewSet(viewsets.Viewset):
class UserViewSet(viewsets.ViewSet):
# Cache requested url for each user for 2 hours
@method_decorator(cache_page(60*60*2))
@ -32,6 +33,7 @@ class UserViewSet(viewsets.Viewset):
}
return Response(content)
class PostView(APIView):
# Cache page for the requested url