Fixes in documentation
This commit is contained in:
parent
cfb70403c1
commit
dc58175760
13 changed files with 119 additions and 113 deletions
|
|
@ -21,7 +21,7 @@ def pass_values_to_form(post, arr_form, yes_error=True, pass_values=True):
|
|||
pass_values (bool): Pass default values or values from post dict to arr_form dict items
|
||||
|
||||
Returns:
|
||||
dict: Return arr_form dict with checked values from post dict.
|
||||
arr_form (dict): Return arr_form dict with checked values from post dict.
|
||||
|
||||
"""
|
||||
|
||||
|
|
@ -76,7 +76,8 @@ class CheckForm():
|
|||
arr_form (dict): Dict composed by a series or forms objects. The keys need to be equal to keys of post dict.
|
||||
|
||||
Returns:
|
||||
dict: Return arr_form dict with checked values from post dict.
|
||||
post (dict): Return post dict with values checked
|
||||
arr_form (dict): Return arr_form with errors and values.
|
||||
|
||||
"""
|
||||
|
||||
|
|
@ -104,10 +105,10 @@ def check_form(post, arr_form, sufix_form='_error'):
|
|||
sufix_form (str): Define the sufix of error_form keys
|
||||
|
||||
Returns:
|
||||
bool: Return False if not errors in checking, if errors return True
|
||||
dict: A dict containing the errors in form fields.
|
||||
post: Sanitized values
|
||||
arr_form: arr_form with errors and values.
|
||||
error (bool): Return False if not errors in checking, if errors return True
|
||||
error_form (dict): A dict containing the errors in form fields.
|
||||
post (dict): Sanitized values
|
||||
arr_form (dict): arr_form with errors and values.
|
||||
|
||||
"""
|
||||
|
||||
|
|
@ -143,7 +144,7 @@ def show_form(post, arr_form, t, yes_error=True, pass_values=True, modelform_tpl
|
|||
|
||||
Returns:
|
||||
|
||||
An html string with the generated form.
|
||||
template (str): An html string with the generated form.
|
||||
|
||||
"""
|
||||
|
||||
|
|
@ -187,7 +188,7 @@ def csrf_token(token_id='csrf_token'):
|
|||
token_id (str): Name of the html hide form
|
||||
|
||||
Returns:
|
||||
Return html input hidden with csrf token saved in session
|
||||
html (str): Return html input hidden with csrf token saved in session
|
||||
"""
|
||||
|
||||
#s=get_session()
|
||||
|
|
@ -202,7 +203,7 @@ def generate_csrf():
|
|||
"""Function for generate a csrf token in a variable
|
||||
|
||||
Returns:
|
||||
csrf token value
|
||||
csrf_token (str): csrf token value
|
||||
"""
|
||||
|
||||
if not 'csrf_token' in session:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue