# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
def wait(request, path):
if WaitedFile.exists(path):
file_url = join(WAITER_URL, path)
def wait(request, path):
if WaitedFile.exists(path):
file_url = join(WAITER_URL, path)
waiting = get_object_or_404(WaitedFile, path=path)
if request.is_ajax():
return HttpResponse(file_url)
else:
waiting = get_object_or_404(WaitedFile, path=path)
if request.is_ajax():
return HttpResponse(file_url)
else: