X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/6d42bc478e3d1bd90eb294464748c21e4de0fc63..c6537f136f4ec0230f5e7c71dd1abf9616151a47:/src/waiter/views.py?ds=inline diff --git a/src/waiter/views.py b/src/waiter/views.py index b001fef1b..120e32ecb 100644 --- a/src/waiter/views.py +++ b/src/waiter/views.py @@ -7,6 +7,7 @@ from waiter.settings import WAITER_URL from django.shortcuts import render, get_object_or_404 from django.http import HttpResponse from django.views.decorators.cache import never_cache +from wolnelektury.utils import is_ajax @never_cache @@ -18,7 +19,7 @@ def wait(request, path): file_url = None waiting = get_object_or_404(WaitedFile, path=path) - if request.is_ajax(): + if is_ajax(request): return HttpResponse(file_url) else: return render(request, "waiter/wait.html", {