X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/9a938c8b406ce05e3bca4a5a483d473ece9e17b0..9b913776e3da4d4879c001b9379808897273c8fd:/src/waiter/views.py diff --git a/src/waiter/views.py b/src/waiter/views.py index 836534e32..120e32ecb 100644 --- a/src/waiter/views.py +++ b/src/waiter/views.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # @@ -8,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 @@ -19,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", {