Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathrun.py
More file actions
Latest commit
32 lines (23 loc) · 755 Bytes
/
Copy pathrun.py
File metadata and controls
32 lines (23 loc) · 755 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
fromflaskimport*
importflask
app=Flask(__name__)
@app.route('/guide/post/<name>')
@app.route('/guide')
defpost_name(name=""):
returnsend_file('index.html')
@app.route('/test')
defpost_test(name=""):
returnsend_file('test.html')
@app.route('/<id>')
defroute_id(id):
returnflask.request.path
@app.route('/bower_components/<path:filename>')
defbower_components(filename):
returnsend_from_directory('./bower_components/', filename)
@app.route('/guide/posts/<path:filename>')
defposts(filename):
returnsend_from_directory('./posts/', filename,cache_timeout=0)
@app.route('/template/<path:filename>')
deftemplate(filename):
returnsend_from_directory('./template/', filename)
app.run(debug=True,host="0.0.0.0")