mirror of
https://github.com/StefBuwalda/cal_counter.git
synced 2025-10-30 03:10:00 +00:00
Add favicon support and static favicon file
Added a route to serve /favicon.ico using send_from_directory and included the favicon.ico file in the static directory. This improves browser tab display and branding.
This commit is contained in:
13
app.py
13
app.py
@@ -1,4 +1,10 @@
|
||||
from flask import render_template, redirect, url_for, request
|
||||
from flask import (
|
||||
render_template,
|
||||
redirect,
|
||||
url_for,
|
||||
request,
|
||||
send_from_directory,
|
||||
)
|
||||
from flask_login import (
|
||||
login_required,
|
||||
logout_user,
|
||||
@@ -46,6 +52,11 @@ def index():
|
||||
return redirect(url_for("login"))
|
||||
|
||||
|
||||
@app.route("/favicon.ico")
|
||||
def favicon():
|
||||
return send_from_directory("static", "favicon.ico")
|
||||
|
||||
|
||||
@app.route("/login", methods=["GET", "POST"])
|
||||
def login():
|
||||
if current_user.is_authenticated:
|
||||
|
||||
BIN
application/static/favicon.ico
Normal file
BIN
application/static/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
Reference in New Issue
Block a user