X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/357027375ff8867f42ca34bcbfb5a78b5b185fc3..5b312d5dfc897d291d4d4ed159fc25d7f5493d41:/src/waiter/views.py?ds=sidebyside diff --git a/src/waiter/views.py b/src/waiter/views.py index b951cc4c8..836534e32 100644 --- a/src/waiter/views.py +++ b/src/waiter/views.py @@ -14,11 +14,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, + })