X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/3fceb197b7f492cf5cfcb4034b6e045638f128d4..f177dd0cdb753827bd208960a159d1bbbaae9e80:/src/catalogue/api/views.py?ds=sidebyside diff --git a/src/catalogue/api/views.py b/src/catalogue/api/views.py index 5a064c1c5..ee9f07403 100644 --- a/src/catalogue/api/views.py +++ b/src/catalogue/api/views.py @@ -3,6 +3,8 @@ # import json from django.http import Http404, HttpResponse +from django.utils.decorators import method_decorator +from django.views.decorators.cache import never_cache from rest_framework.generics import ListAPIView, RetrieveAPIView, get_object_or_404 from rest_framework.permissions import DjangoModelPermissionsOrAnonReadOnly from rest_framework.response import Response @@ -227,6 +229,7 @@ class EpubView(RetrieveAPIView): lookup_field = 'slug' permission_classes = [IsClubMember] + @method_decorator(never_cache) def get(self, *args, **kwargs): return HttpResponse(self.get_object().get_media('epub'))