@@ -17,10 +17,10 @@ along with searx. If not, see < http://www.gnu.org/licenses/ >.
17(C) 2013- by Adam Tauber, <asciimoo@gmail.com>
17(C) 2013- by Adam Tauber, <asciimoo@gmail.com>
20if __name__ == "__main__":
21if __name__ == "__main__":
21 from sys import path
22 from sys import path
22− from os.path import realpath, dirname
23− path.append(realpath(dirname(realpath(__file__))+'/../'))
23+ path.append(os.path.realpath(os.path.dirname(os.path.realpath(__file__))+'/../'))
25from flask import Flask, request, render_template, url_for, Response, make_response
25from flask import Flask, request, render_template, url_for, Response, make_response
26from searx.engines import search, categories, engines, get_engines_stats
26from searx.engines import search, categories, engines, get_engines_stats
@@ -28,6 +28,8 @@ from searx import settings
28import json
28import json
29import cStringIO
29import cStringIO
30from searx.utils import UnicodeWriter
30from searx.utils import UnicodeWriter
31+from flask import send_from_directory
33app = Flask(__name__)
35app = Flask(__name__)
@@ -133,10 +135,6 @@ def index():
134 return resp
136 return resp
136−@app.route('/favicon.ico', methods=['GET'])
140@app.route('/about', methods=['GET'])
138@app.route('/about', methods=['GET'])
141def about():
139def about():
142 global categories
140 global categories
@@ -172,6 +170,13 @@ def opensearch():
172 mimetype="application/xml")
170 mimetype="application/xml")
173 return resp
171 return resp
173+@app.route('/favicon.ico')
175+ print os.path.join(app.root_path, 'static/img'), 'asdf'
176+ return send_from_directory(os.path.join(app.root_path, 'static/img'),
177+ 'favicon.png', mimetype='image/vnd.microsoft.icon')
175if __name__ == "__main__":
180if __name__ == "__main__":
176 from gevent import monkey
181 from gevent import monkey
177 monkey.patch_all()
182 monkey.patch_all()