commit
e5a2fe48cc
5 changed files with 10 additions and 1 deletions
BIN
app/static/favicon.ico
Normal file
BIN
app/static/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
BIN
app/static/favicon_orange.ico
Normal file
BIN
app/static/favicon_orange.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
Binary file not shown.
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
BIN
app/static/logo_orange.png
Normal file
BIN
app/static/logo_orange.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
|
@ -1,7 +1,8 @@
|
|||
from datetime import datetime, timedelta
|
||||
|
||||
from flask import url_for, render_template, abort
|
||||
from flask import url_for, render_template, abort, send_from_directory
|
||||
from flask_login import login_required
|
||||
import os
|
||||
|
||||
from app import app
|
||||
from models import Order, Location
|
||||
|
@ -45,6 +46,14 @@ def profile():
|
|||
return render_template('profile.html')
|
||||
|
||||
|
||||
@app.route('/favicon.ico')
|
||||
def favicon():
|
||||
if len(get_orders((Order.stoptime > datetime.now()))) == 0:
|
||||
return send_from_directory(os.path.join(app.root_path, 'static'), 'favicon.ico', mimetype='image/x-icon')
|
||||
else:
|
||||
return send_from_directory(os.path.join(app.root_path, 'static'), 'favicon_orange.ico', mimetype='image/x-icon')
|
||||
|
||||
|
||||
if app.debug: # add route information
|
||||
@app.route('/routes')
|
||||
@login_required
|
||||
|
|
Loading…
Reference in a new issue