16 lines
459 B
Python
16 lines
459 B
Python
from tools import *
|
|
from AppBridge import *
|
|
from Utils.Config import *
|
|
|
|
|
|
@App.before_request
|
|
def WebRunPyBeforeRequest():
|
|
_=flask.request.path.split(".")
|
|
if len(_) >= 2 and (".".join([_[-2], _[-1]])).lower() == "web.py":
|
|
g={}
|
|
exec(openr("%s%s" % (TempLate, flask.request.path)), g)
|
|
if "WebRet" in g and hasattr(g["WebRet"], "Html"):
|
|
return g["WebRet"].Html
|
|
else:
|
|
flask.abort(404)
|