12 lines
271 B
Python
12 lines
271 B
Python
|
|
# -*- 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 )
|