controllers package¶
Submodules¶
controllers.alerts module¶
This module handles the routes corresponding to the models.alert.Alert model.
-
controllers.alerts.logger¶ The logger used to log information of module.
- Type
-
controllers.alerts.delete(alert_id: str) → Union[str, werkzeug.wrappers.response.Response][source]¶ Handles the RESTful DESTROY route.
- Parameters
alert_id (str) – The
models.alert.Alertid- Returns
The INDEX template.
- Return type
-
controllers.alerts.edit(alert_id: str) → Union[str, werkzeug.wrappers.response.Response][source]¶ Handles the RESTful EDIT (GET method) and UPDATE (POST method) routes.
- Parameters
alert_id (str) – The
models.alert.Alertid- Returns
The INDEX template if POST method, EDIT template otherwise.
- Return type
controllers.stores module¶
This module handles the routes corresponding to the models.store.Store model.
-
controllers.stores.logger¶ The logger used to log information of module.
- Type
-
controllers.stores.delete(store_id: str) → Union[str, werkzeug.wrappers.response.Response][source]¶ Handles the RESTful DESTROY route.
- Parameters
store_id (str) – The
models.store.Storeid- Returns
The INDEX template.
- Return type
-
controllers.stores.edit(store_id: str) → Union[str, werkzeug.wrappers.response.Response][source]¶ Handles the RESTful EDIT (GET method) and UPDATE (POST method) routes.
- Parameters
store_id (str) – The
models.store.Storeid- Returns
The INDEX template if POST method, EDIT template otherwise.
- Return type
controllers.users module¶
This module handles the routes corresponding to the models.user.user.User model.
-
controllers.users.logger¶ The logger used to log information of module.
- Type
-
controllers.users.edit() → Union[str, werkzeug.wrappers.response.Response][source]¶ Handles the RESTful NEW (GET method) and CREATE (POST method) routes.
- Returns
The Alerts INDEX template if POST method, Alerts INDEX template otherwise.
- Return type
- Raises
UserErrors.UserError – If the user couldn’t be created.
-
controllers.users.login()[source]¶ Handles the Log in route.
- Returns
The Users LOGIN template if POST method, Alerts INDEX template otherwise.
- Return type
- Raises
UserErrors.UserError – If the user couldn’t be created.