-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
36 lines (29 loc) · 810 Bytes
/
app.py
File metadata and controls
36 lines (29 loc) · 810 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
from flask import Flask, render_template, abort
from os.path import join
app = Flask(__name__)
@app.route("/")
def index():
return render_template("index.html")
@app.route("/res/license")
def license():
return render_template(join("res", "license.html"))
@app.route("/docs/python/<filename>")
def pydocs(filename):
try:
return render_template(filename + ".html")
except:
abort(404)
@app.route("/docs/web/<filename>")
def webdocs(filename):
try:
return render_template(join("web", filename + ".html"))
except:
abort(404)
@app.route("/docs/web/lib/<filename>")
def webdocs_lib(filename):
try:
return render_template(join("web", "lib", filename + ".html"))
except:
abort(404)
if __name__ == "__main__":
app.run(debug=True)