added favicon.ico

This commit is contained in:
Igor Chubin 2015-12-27 09:52:50 +02:00
parent 694a25eb86
commit 757baad76a

View file

@ -44,6 +44,8 @@ so we have brought you to Oymyakon,
one of the coldest permanently inhabited locales on the planet. one of the coldest permanently inhabited locales on the planet.
""" """
if not os.path.exists(os.path.dirname( LOG_FILE )):
os.makedirs( os.path.dirname( LOG_FILE ) )
logging.basicConfig(filename=LOG_FILE, level=logging.DEBUG) logging.basicConfig(filename=LOG_FILE, level=logging.DEBUG)
reader = geoip2.database.Reader(GEOLITE) reader = geoip2.database.Reader(GEOLITE)
@ -211,10 +213,12 @@ def show_help():
@app.route('/files/<path:path>') @app.route('/files/<path:path>')
def send_static(path): def send_static(path):
print path
print STATIC
return send_from_directory(STATIC, path) return send_from_directory(STATIC, path)
@app.route('/favicon.ico')
def send_favicon():
return send_from_directory(STATIC, 'favicon.ico')
@app.route("/") @app.route("/")
@app.route("/<string:location>") @app.route("/<string:location>")
def wttr(location = None): def wttr(location = None):