Permalink
Browse files

devops: add favicon.ico

  • Loading branch information...
1 parent ead69a6 commit 909ce22132ed081feca02e2fb255afa08b59611d @yaniv-aknin yaniv-aknin committed Feb 20, 2013
Showing with 8 additions and 1 deletion.
  1. +6 −1 backend/app.py
  2. +2 −0 backend/templates/main.html
  3. BIN frontend/favicon.ico
View
7 backend/app.py
@@ -1,11 +1,12 @@
from logging import getLogger
from os import environ
-from flask import Flask
+from flask import Flask, send_from_directory
from sqlalchemy import event
from sqlalchemy.engine import Engine
from utils.flaskutils import install_request_logger
+from utils.ext.path import Path
app = None
@@ -37,4 +38,8 @@ def initialize_app(settings):
import api ; api
import auth ; auth
+ @app.route('/favicon.ico')
+ def favicon():
+ return send_from_directory(Path(app.root_path)/'static', 'favicon.ico', mimetype='image/vnd.microsoft.icon')
+
return app
View
2 backend/templates/main.html
@@ -1,5 +1,7 @@
{% extends "base.html" %}
{% block head -%}
+ <link rel="shortcut icon" href="/static/favicon.ico" type="image/x-icon">
+ <link rel="icon" href="/static/favicon.ico" type="image/x-icon">
<script type="text/javascript" charset="utf-8" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
{%- endblock %}
View
BIN frontend/favicon.ico
Binary file not shown.

0 comments on commit 909ce22

Please sign in to comment.