Many fixes and docstrings

This commit is contained in:
Antonio de la Rosa 2022-04-01 01:04:29 +02:00
parent eb93be38ea
commit dd67eafd0d
5 changed files with 118 additions and 10 deletions

View file

@ -6,6 +6,17 @@ login_name='login'
login_url='.login'
def db(f):
"""Wrapper function for add db connection to your flask function
Wrapper function for add db connection to your flask function. Also close the connection if error or function exection is finished.
Args:
*args : The args of function
**kwds : Standard python extra arguments of function
Returns:
wrapper (function): Return the wrapper.
"""
@wraps(f)
@ -30,6 +41,17 @@ def db(f):
return wrapper
def login_site(f):
"""Wrapper function for check login in your flask function
Wrapper function for check a login session in your flask function. If
Args:
*args : The args of function
**kwds : Standard python extra arguments of function
Returns:
wrapper (function): Return the wrapper.
"""
@wraps(f)