mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-07 23:35:22 +01:00
Bumps django to 4.0 and fixes associated issues
This commit is contained in:
parent
71e5b5cf72
commit
78258eb9cb
6 changed files with 23 additions and 17 deletions
|
|
@ -18,6 +18,7 @@ from django.db.models.functions import Lower
|
|||
from django.http import Http404
|
||||
from django.http import HttpResponse
|
||||
from django.http import HttpResponseBadRequest
|
||||
from django.utils.decorators import method_decorator
|
||||
from django.utils.translation import get_language
|
||||
from django.views.decorators.cache import cache_control
|
||||
from django.views.generic import TemplateView
|
||||
|
|
@ -332,7 +333,7 @@ class DocumentViewSet(
|
|||
raise Http404()
|
||||
|
||||
@action(methods=["get"], detail=True)
|
||||
@cache_control(public=False, max_age=315360000)
|
||||
@method_decorator(cache_control(public=False, max_age=315360000))
|
||||
def thumb(self, request, pk=None):
|
||||
try:
|
||||
doc = Document.objects.get(id=pk)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue