summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorasciimoo <asciimoo@gmail.com>2014-01-01 23:04:13 +0100
committerasciimoo <asciimoo@gmail.com>2014-01-01 23:04:13 +0100
commitd2898b08187101aad477ef48c8ea7518cee8b925 (patch)
tree6d7315987da0829e7334afcaaa4cb0ae6c1ef3e9
parentfbe5fc3986c91d5dc463b067a2419d92255aed2d (diff)
[enh] preferences redirection
-rw-r--r--searx/webapp.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/searx/webapp.py b/searx/webapp.py
index e06b985d1..b7e2a4674 100644
--- a/searx/webapp.py
+++ b/searx/webapp.py
@@ -22,7 +22,7 @@ if __name__ == "__main__":
from sys import path
path.append(os.path.realpath(os.path.dirname(os.path.realpath(__file__))+'/../'))
-from flask import Flask, request, render_template, url_for, Response, make_response
+from flask import Flask, request, render_template, url_for, Response, make_response, redirect
from searx.engines import search, categories, engines, get_engines_stats
from searx import settings
import json
@@ -151,8 +151,7 @@ def preferences():
continue
selected_categories.append(category)
if selected_categories:
- template = render('preferences.html', selected_categories=selected_categories)
- resp = make_response(template)
+ resp = make_response(redirect('/'))
resp.set_cookie('categories', ','.join(selected_categories))
return resp
return render('preferences.html')