Add caches to photos
This commit is contained in:
parent
a170e12c1c
commit
59860c3e37
1 changed files with 2 additions and 0 deletions
|
|
@ -6,10 +6,12 @@ from django.contrib.auth import get_user_model
|
|||
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||
from django.http import HttpResponse
|
||||
from django.views.generic import ListView, View
|
||||
from django.views.decorators.cache import cache_page
|
||||
from photologue.models import Gallery
|
||||
|
||||
|
||||
class MediaAccess(LoginRequiredMixin, View):
|
||||
@cache_page(31*24*60*60)
|
||||
def get(self, request, path):
|
||||
response = HttpResponse()
|
||||
# Content-type will be detected by nginx
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue