forked from marianlonga/ichack18
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpush_to_server.py
More file actions
40 lines (26 loc) · 729 Bytes
/
push_to_server.py
File metadata and controls
40 lines (26 loc) · 729 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
from flask import Flask, render_template
app = Flask(__name__)
@app.route("/output")
def output():
food_log = ""
with open('food_log.json', 'r') as file:
food_log = file.read()
return food_log
#return render_template("index.html", food_log=food_log)
@app.route("/")
def graphs():
return render_template("index.html")
@app.route("/chart.js")
def chart_js():
return render_template("chart.js")
@app.route("/chartConfigs.js")
def chart_configs_js():
return render_template("chartConfigs.js")
#@app.route('/new/assets/<path:path>')
#def catch_all(path):
#print("path: " + path)
#full_path = './new/assets/' + path
#print(full_path)
#return app.send_static_file(full_path)
if __name__ == "main":
app.run()