基本构建

This commit is contained in:
mkg
2021-03-18 22:59:02 +08:00
parent 3cf62d4305
commit d2a2b35317
638 changed files with 198871 additions and 0 deletions
@@ -0,0 +1,13 @@
from flask import session
def init_template_global(app):
@app.template_global()
def authorize(power):
# print(power)
# print(session.get('permissions'))
return bool(power in session.get('permissions'))
@app.template_global()
def ab(a,b):
return a+b