mirror of
https://github.com/senju1337/senju.git
synced 2025-12-23 23:39:27 +00:00
feat/OPS-36: add favicon to all sites
This commit is contained in:
parent
632bdf6612
commit
bdb1502203
2 changed files with 8 additions and 1 deletions
|
|
@ -2,11 +2,13 @@ from __future__ import annotations
|
|||
|
||||
from pathlib import Path
|
||||
|
||||
from flask import Flask, redirect, render_template, request, url_for
|
||||
from flask import Flask, redirect, render_template, request, url_for, send_from_directory
|
||||
|
||||
from senju.haiku import Haiku
|
||||
from senju.store_manager import StoreManager
|
||||
|
||||
import os
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
store = StoreManager(Path("/tmp/store.db"))
|
||||
|
|
@ -60,3 +62,8 @@ def generate_haiku():
|
|||
return str(id)
|
||||
else:
|
||||
return "Method not allowed", 405
|
||||
|
||||
|
||||
@app.route('/favicon.ico')
|
||||
def favicon():
|
||||
return send_from_directory(os.path.join(app.root_path, 'static/img'), 'favicon.ico', mimetype='image/vnd.microsoft.icon')
|
||||
BIN
senju/static/img/favicon.ico
Normal file
BIN
senju/static/img/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
Loading…
Add table
Add a link
Reference in a new issue