aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Cholewiński <harry666t@gmail.com>2015-04-16 22:27:17 +0200
committerKamil Cholewiński <harry666t@gmail.com>2015-04-16 22:27:17 +0200
commitcc4a88e40fc157d14901b7c455a8811b33d4cd8d (patch)
treeb41a2d7d7e256548d0122e95d5dd737bd72d928d
parent695c2aad12e9f782a72ecdefd3ba489e68ed954c (diff)
downloadmpw-cc4a88e40fc157d14901b7c455a8811b33d4cd8d.zip
mpw-cc4a88e40fc157d14901b7c455a8811b33d4cd8d.tar.gz
mpw-cc4a88e40fc157d14901b7c455a8811b33d4cd8d.tar.bz2
Favicon
-rw-r--r--mpw.py9
-rw-r--r--static/favicon.icobin0 -> 766 bytes
-rw-r--r--templates/base.html1
3 files changed, 10 insertions, 0 deletions
diff --git a/mpw.py b/mpw.py
index ac19011..5baf561 100644
--- a/mpw.py
+++ b/mpw.py
@@ -226,6 +226,15 @@ def settings(key, value):
return flask.redirect(flask.url_for("index"))
+@app.route("/favicon.ico")
+def favicon():
+ return flask.send_from_directory(
+ os.path.join(app.root_path, "static"),
+ "favicon.ico",
+ mimetype="image/vnd.microsoft.icon",
+ )
+
+
if __name__ == "__main__":
import argparse
argparser = argparse.ArgumentParser()
diff --git a/static/favicon.ico b/static/favicon.ico
new file mode 100644
index 0000000..0e090f2
--- /dev/null
+++ b/static/favicon.ico
Binary files differ
diff --git a/templates/base.html b/templates/base.html
index a8a1aee..ef72b80 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -15,6 +15,7 @@
<head>
<meta charset="utf-8" />
<meta name="generator" content="flask" />
+ <link rel="icon" href="/favicon.ico" />
{% block autorefresh %}
{% if autorefresh > 0 %}
<meta http-equiv="refresh" content="{{ autorefresh }}" />