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

logging.Logger

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.Alert id

Returns

The INDEX template.

Return type

str

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.Alert id

Returns

The INDEX template if POST method, EDIT template otherwise.

Return type

str

controllers.alerts.index() → Union[str, werkzeug.wrappers.response.Response][source]

Handles the RESTful INDEX route.

Returns

The INDEX template.

Return type

str

controllers.alerts.new() → Union[str, werkzeug.wrappers.response.Response][source]

Handles the RESTful NEW (GET method) and CREATE (POST method) routes.

Returns

The INDEX template if POST method, NEW template otherwise.

Return type

str

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

logging.Logger

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.Store id

Returns

The INDEX template.

Return type

str

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.Store id

Returns

The INDEX template if POST method, EDIT template otherwise.

Return type

str

controllers.stores.index() → Union[str, werkzeug.wrappers.response.Response][source]

Handles the RESTful INDEX route.

Returns

The INDEX template.

Return type

str

controllers.stores.new() → Union[str, werkzeug.wrappers.response.Response][source]

Handles the RESTful NEW (GET method) and CREATE (POST method) routes.

Returns

The INDEX template if POST method, NEW template otherwise.

Return type

str

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

logging.Logger

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

str

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

str

Raises

UserErrors.UserError – If the user couldn’t be created.

controllers.users.logout()[source]

Handles the Log out route.

Returns

Redirects to the login route.

Return type

Response

controllers.users.register()[source]

Handles the RESTful NEW (GET method) and CREATE (POST method) routes.

Returns

The Alerts INDEX template if POST method, Users REGISTER template otherwise.

Return type

str

Raises

UserErrors.UserError – If the user couldn’t be created.

Module contents