Browse Source

[u] 增加templates目录路由

master
luoning 8 years ago
parent
commit
24685df96c
  1. 5
      src/main.py

5
src/main.py

@ -84,6 +84,11 @@ def callback(filepath):
return b.static_file(filepath, os.path.join(CURRENT_DIR, "static")) return b.static_file(filepath, os.path.join(CURRENT_DIR, "static"))
@app.route('/templates/<filepath:path>')
def callback(filepath):
return b.static_file(filepath, os.path.join(CURRENT_DIR, "templates"))
@b.error @b.error
def error403(error): def error403(error):
return "非法访问 " + error return "非法访问 " + error

Loading…
Cancel
Save