From 2adab13d5091d68fd1987248acd31d53ebbdfddd Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Sun, 24 Feb 2019 19:59:08 +0100 Subject: [PATCH] Added favicon --- platypush/backend/http/app/routes/resources.py | 11 ++++++++++- .../backend/http/static/resources/favicon.ico | Bin 0 -> 5694 bytes 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 platypush/backend/http/static/resources/favicon.ico diff --git a/platypush/backend/http/app/routes/resources.py b/platypush/backend/http/app/routes/resources.py index 8b04ddd2c..7cc89d2a4 100644 --- a/platypush/backend/http/app/routes/resources.py +++ b/platypush/backend/http/app/routes/resources.py @@ -4,16 +4,18 @@ import re from flask import Blueprint, abort, send_from_directory from platypush.config import Config -from platypush.backend.http.app import template_folder +from platypush.backend.http.app import template_folder, base_folder from platypush.backend.http.app.utils import authenticate, authentication_ok, \ send_message resources = Blueprint('resources', __name__, template_folder=template_folder) +favicon = Blueprint('favicon', __name__, template_folder=template_folder) # Declare routes list __routes__ = [ resources, + favicon, ] @resources.route('/resources/', methods=['GET']) @@ -52,4 +54,11 @@ def resources_path(path): return send_from_directory(real_path, file_path) +@favicon.route('/favicon.ico', methods=['GET']) +def favicon(): + """ favicon.ico icon """ + return send_from_directory(os.path.join(base_folder, 'static', 'resources'), + 'favicon.ico') + + # vim:sw=4:ts=4:et: diff --git a/platypush/backend/http/static/resources/favicon.ico b/platypush/backend/http/static/resources/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..9e69c1ca582b9d89d2ce9f96a0dac312ed437bfa GIT binary patch literal 5694 zcmeI0Jx;?w5QU$WBI!a!g+!Z@10b9ua08CAdjoESa+H*mAW1!NCHV92_%6e zkOcl8frvP6xe$ldLWgVqH|i>0$toJk8hw)9$UNKtkBr(F#;Kz$7agbW$Jx*4A#LBK zK+Dwgso{Fm@~TXC#0&kfzmNF#{pcj>kJk87vA$I6iN8F%(lzV}_G!|5)1~M5%6a{p zPu(B)bJO0pM8(s;&EvT|Z=2I>{0x2;R^_)mzedJ!tMxNOT{uvp#kkb@yp86(`XFsw a^HI7(k5u&g_%tn)JJ@yLyUu>8Oc-Zuixa~D literal 0 HcmV?d00001