Add favicon and Dockerfile
This commit is contained in:
13
app.py
13
app.py
@@ -1,4 +1,5 @@
|
||||
from flask import Flask, render_template, request, session
|
||||
import os
|
||||
from flask import Flask, render_template, request, session, send_from_directory
|
||||
from flask_bootstrap import Bootstrap
|
||||
|
||||
app = Flask(__name__)
|
||||
@@ -7,6 +8,7 @@ Bootstrap(app)
|
||||
|
||||
gesamtwert = 0
|
||||
change = 0
|
||||
given = 0
|
||||
sum = ""
|
||||
item1 = 0
|
||||
item2 = 0
|
||||
@@ -17,7 +19,7 @@ item6 = 0
|
||||
|
||||
@app.route("/", methods=["GET", "POST"])
|
||||
def index():
|
||||
global gesamtwert, item1, item2, item3, item4, item5, item6, sum, givenfloat, change
|
||||
global gesamtwert, item1, item2, item3, item4, item5, item6, sum, givenfloat, change, given
|
||||
|
||||
if request.method == "POST":
|
||||
# wert = float(request.form["wert"])
|
||||
@@ -79,5 +81,10 @@ def index():
|
||||
item6=session.get('item6', 0),
|
||||
)
|
||||
|
||||
@app.route('/favicon.ico')
|
||||
def favicon():
|
||||
return send_from_directory(os.path.join(app.root_path, 'static'),
|
||||
'favicon.ico', mimetype='image/vnd.microsoft.icon')
|
||||
|
||||
if __name__ == "__main__":
|
||||
app.run(debug=True, host="192.168.177.24")
|
||||
app.run(debug=True, host='0.0.0.0')
|
Reference in New Issue
Block a user