edit tt display, tweak css
This commit is contained in:
13
app.py
13
app.py
@@ -1,4 +1,4 @@
|
||||
from flask import Flask, render_template, url_for, jsonify, send_file
|
||||
from flask import Flask, render_template, url_for, jsonify, send_file, request
|
||||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
|
||||
@@ -18,6 +18,8 @@ def compile_javascript(base_path = "static"):
|
||||
return js_files
|
||||
|
||||
eva = 8002377
|
||||
# eva = 8004158
|
||||
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
@@ -28,19 +30,16 @@ def favicon():
|
||||
@app.route("/")
|
||||
def main_page():
|
||||
# print(compile_javascript())
|
||||
tt = Timetable(eva)
|
||||
tt.get_changes()
|
||||
|
||||
return render_template(
|
||||
'base.html',
|
||||
title="testin",
|
||||
station="Gröbenzell",
|
||||
station=tt.station,
|
||||
current_time_str=datetime.now().strftime(r"%H:%M:%S"),
|
||||
js_files=compile_javascript()
|
||||
)
|
||||
|
||||
# TODO: add a text entry field to change the EVA
|
||||
# @app.route("/setup")
|
||||
# def setup():
|
||||
# return ""
|
||||
|
||||
@app.route("/update", methods=['POST'])
|
||||
def update():
|
||||
|
||||
Reference in New Issue
Block a user