From 740f507c0e7eeed05c5a804d2a02289453f4672c Mon Sep 17 00:00:00 2001 From: koniu Date: Sun, 3 Mar 2013 23:51:09 +0000 Subject: [PATCH] py/tpl: fix #4 ('..' breaks WSGI, use './' instead) Thanks to nberelidze@github for spotting and providing solution. --- views/pages.tpl | 2 +- views/results.tpl | 4 ++-- views/search.tpl | 2 +- views/settings.tpl | 2 +- webui.py | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/views/pages.tpl b/views/pages.tpl index 4a06ca1..97c217c 100644 --- a/views/pages.tpl +++ b/views/pages.tpl @@ -1,7 +1,7 @@ %q = dict(query) %def page_href(page): %q['page'] = page - %return '../results?%s' % urllib.urlencode(q) + %return './results?%s' % urllib.urlencode(q) %end %if nres > 0: %import math, urllib diff --git a/views/results.tpl b/views/results.tpl index 662924e..bf65117 100644 --- a/views/results.tpl +++ b/views/results.tpl @@ -7,8 +7,8 @@ %if len(res) > 0:
- JSON - CSV + JSON + CSV
%end
diff --git a/views/search.tpl b/views/search.tpl index 3c87d90..abe2ac7 100644 --- a/views/search.tpl +++ b/views/search.tpl @@ -7,7 +7,7 @@ Query

  -   +   diff --git a/views/settings.tpl b/views/settings.tpl index bc9f1d1..7c77c3f 100644 --- a/views/settings.tpl +++ b/views/settings.tpl @@ -23,7 +23,7 @@ %end


- + %include footer diff --git a/webui.py b/webui.py index eb523f3..79c91e1 100755 --- a/webui.py +++ b/webui.py @@ -274,7 +274,7 @@ def set(): for d in config['dirs']: cookie_name = 'mount_%s' % urllib.quote(d, '') bottle.response.set_cookie(cookie_name, str(bottle.request.query.get('mount_%s' % d)), max_age=3153600000) - bottle.redirect('..') + bottle.redirect('./') #}}} #}}} # vim: fdm=marker:tw=80:ts=4:sw=4:sts=4:et