Revised the documentation of the views.
This commit is contained in:
parent
5238168b2d
commit
7dc754174c
@ -95,7 +95,8 @@ def add_account() -> redirect:
|
|||||||
def show_account_detail(account: Account) -> str:
|
def show_account_detail(account: Account) -> str:
|
||||||
"""Shows the account detail.
|
"""Shows the account detail.
|
||||||
|
|
||||||
:return: The account detail.
|
:param account: The account.
|
||||||
|
:return: The detail.
|
||||||
"""
|
"""
|
||||||
return render_template("accounting/account/detail.html", obj=account)
|
return render_template("accounting/account/detail.html", obj=account)
|
||||||
|
|
||||||
@ -105,7 +106,8 @@ def show_account_detail(account: Account) -> str:
|
|||||||
def show_account_edit_form(account: Account) -> str:
|
def show_account_edit_form(account: Account) -> str:
|
||||||
"""Shows the form to edit an account.
|
"""Shows the form to edit an account.
|
||||||
|
|
||||||
:return: The form to edit an account.
|
:param account: The account.
|
||||||
|
:return: The form to edit the account.
|
||||||
"""
|
"""
|
||||||
form: AccountForm
|
form: AccountForm
|
||||||
if "form" in session:
|
if "form" in session:
|
||||||
@ -123,6 +125,7 @@ def show_account_edit_form(account: Account) -> str:
|
|||||||
def update_account(account: Account) -> redirect:
|
def update_account(account: Account) -> redirect:
|
||||||
"""Updates an account.
|
"""Updates an account.
|
||||||
|
|
||||||
|
:param account: The account.
|
||||||
:return: The redirection to the account detail on success, or the account
|
:return: The redirection to the account detail on success, or the account
|
||||||
edit form on error.
|
edit form on error.
|
||||||
"""
|
"""
|
||||||
@ -152,6 +155,7 @@ def update_account(account: Account) -> redirect:
|
|||||||
def delete_account(account: Account) -> redirect:
|
def delete_account(account: Account) -> redirect:
|
||||||
"""Deletes an account.
|
"""Deletes an account.
|
||||||
|
|
||||||
|
:param account: The account.
|
||||||
:return: The redirection to the account list on success, or the account
|
:return: The redirection to the account list on success, or the account
|
||||||
detail on error.
|
detail on error.
|
||||||
"""
|
"""
|
||||||
@ -182,7 +186,8 @@ def sort_accounts(base: BaseAccount) -> redirect:
|
|||||||
"""Sorts the accounts under a base account.
|
"""Sorts the accounts under a base account.
|
||||||
|
|
||||||
:param base: The base account.
|
:param base: The base account.
|
||||||
:return: Sorts the accounts under the base account.
|
:return: The redirection to the incoming account or the account list. The
|
||||||
|
sorting operation does not fail.
|
||||||
"""
|
"""
|
||||||
form: AccountSortForm = AccountSortForm(base)
|
form: AccountSortForm = AccountSortForm(base)
|
||||||
form.save_order()
|
form.save_order()
|
||||||
|
@ -46,7 +46,8 @@ def list_accounts() -> str:
|
|||||||
def show_account_detail(account: BaseAccount) -> str:
|
def show_account_detail(account: BaseAccount) -> str:
|
||||||
"""Shows the account detail.
|
"""Shows the account detail.
|
||||||
|
|
||||||
:return: The account detail.
|
:param account: The account.
|
||||||
|
:return: The detail.
|
||||||
"""
|
"""
|
||||||
return render_template("accounting/base-account/detail.html", obj=account)
|
return render_template("accounting/base-account/detail.html", obj=account)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user