python学习

This commit is contained in:
2019-07-29 15:28:02 +08:00
parent 5ee5b5035c
commit 04327fbd47
18 changed files with 709 additions and 274 deletions

View File

@@ -57,4 +57,11 @@ def iPagination( params ):
def ops_render( template,context = {} ):
if 'current_user' in g:
context['current_user'] = g.current_user
return render_template( template,**context )
return render_template( template,**context )
'''
获取当前时间
'''
def getCurrentDate( format = "%Y-%m-%d %H:%M:%S"):
#return datetime.datetime.now().strftime( format )
return datetime.datetime.now()