From adcc953b4dd2dce1f91bd7cd11105e9f0653f704 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Sat, 19 Dec 2009 15:13:10 +0100 Subject: fixed reconnect --- module/web/pyload/views.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'module/web/pyload') diff --git a/module/web/pyload/views.py b/module/web/pyload/views.py index 904e312e7..a51a9c4dc 100644 --- a/module/web/pyload/views.py +++ b/module/web/pyload/views.py @@ -51,6 +51,11 @@ def permission(perm): return _dec + +def status_proc(request): + return {'status': settings.PYLOAD.status_server()} + + def base(request, messages): return render_to_response(join(settings.TEMPLATE,'base.html'), {'messages': messages},RequestContext(request)) @@ -58,14 +63,14 @@ def base(request, messages): @permission('pyload.can_see_dl') @check_server def home(request): - return render_to_response(join(settings.TEMPLATE,'home.html'), RequestContext(request)) + return render_to_response(join(settings.TEMPLATE,'home.html'), RequestContext(request,{},[status_proc])) @login_required @permission('pyload.can_see_dl') @check_server def queue(request): - return render_to_response(join(settings.TEMPLATE,'queue.html'), RequestContext(request)) + return render_to_response(join(settings.TEMPLATE,'queue.html'), RequestContext(request,{},[status_proc])) @login_required @@ -94,7 +99,7 @@ def downloads(request): data['files'].append(item) - return render_to_response(join(settings.TEMPLATE,'downloads.html'), {'files': data}, RequestContext(request)) + return render_to_response(join(settings.TEMPLATE,'downloads.html'), RequestContext(request,{'files': data},[status_proc])) @login_required @permission('pyload.user.can_download') @@ -132,4 +137,4 @@ def download(request,path): @permission('pyload.user.can_see_logs') @check_server def logs(request): - return render_to_response(join(settings.TEMPLATE,'logs.html'), RequestContext(request)) \ No newline at end of file + return render_to_response(join(settings.TEMPLATE,'logs.html'), RequestContext(request,{},[status_proc])) \ No newline at end of file -- cgit v1.2.3