forked from IfcOpenShell/website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.py
57 lines (39 loc) · 1.43 KB
/
app.py
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
from flask import Flask, render_template, url_for
import builds
app = Flask(__name__, static_folder="static")
@app.route("/")
def home():
return render_template("index.html")
@app.route("/ifcmax")
def max():
return render_template("ifcmax.html")
@app.route("/bimserver")
def bimserver():
dico_master = builds.get("IfcGeomServer", "master")
return render_template("bimserver.html", builds_master=dico_master)
@app.route("/ifcblender")
def blender():
dico_master = builds.get("IfcBlender", "master")
dico_v6 = builds.get("IfcBlender", "v0.6.0")
return render_template(
"ifcblender.html", builds_master=dico_master, builds_v06=dico_v6
)
@app.route("/ifcconvert")
def convert():
dico_master = builds.get("IfcConvert", "master")
dico_v6 = builds.get("IfcConvert", "v0.6.0")
dico_v7 = builds.get('IfcConvert','v0.7.0')
return render_template(
"ifcconvert.html", builds_master=dico_master, builds_v06=dico_v6, dict_v7=dico_v7
)
@app.route("/python")
def python():
dico_master = builds.get("ifcopenshell-python", "master")
dico_v6 = builds.get("ifcopenshell-python", "v0.6.0")
dict_v7 = builds.get('ifcopenshell-python','v0.7.0')
return render_template("python.html", builds_master=dico_master, builds_v06=dico_v6, dict_v7=dict_v7)
@app.route("/code")
def code():
return render_template("code.html")
if __name__ == "__main__":
app.run(debug=True, host="0.0.0.0")