python学习

This commit is contained in:
2019-07-22 14:50:06 +08:00
parent accd7523be
commit 40dac844cc
19 changed files with 621 additions and 400 deletions

12
common/libs/Helper.py Normal file
View File

@@ -0,0 +1,12 @@
# -*- coding: utf-8 -*-
from flask import g,render_template
import datetime
'''
统一渲染方法
'''
def ops_render( template,context = {} ):
if 'current_user' in g:
context['current_user'] = g.current_user
return render_template( template,**context )