python学习
This commit is contained in:
12
common/libs/Helper.py
Normal file
12
common/libs/Helper.py
Normal 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 )
|
||||
Reference in New Issue
Block a user