X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/ae60b2a3949e96357477cc04f90fd0873cee8a92..d019a9b5e928dcf777852d0c8d5413fd3d69b4dd:/src/waiter/views.py diff --git a/src/waiter/views.py b/src/waiter/views.py index b951cc4c8..b001fef1b 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. # @@ -14,11 +13,15 @@ from django.views.decorators.cache import never_cache def wait(request, path): if WaitedFile.exists(path): file_url = join(WAITER_URL, path) + waiting = None else: - file_url = "" + file_url = None waiting = get_object_or_404(WaitedFile, path=path) if request.is_ajax(): return HttpResponse(file_url) else: - return render(request, "waiter/wait.html", locals()) + return render(request, "waiter/wait.html", { + 'waiting': waiting, + 'file_url': file_url, + })