- waiting_for = get_object_or_404(WaitedFile, path=path)
- # TODO: check if not stale, inform the user and send some mail if so.
- return render(request, "waiter/wait.html", locals())
+ file_url = ""
+ waiting = get_object_or_404(WaitedFile, path=path)
+
+ if request.is_ajax():
+ return HttpResponse(file_url)
+ else:
+ return render(request, "waiter/wait.html", locals())