tori.decorator.controller¶
| Author: | Juti Noppornpitak |
|---|
This package contains decorators for enhancing controllers.
-
tori.decorator.controller.custom_error(template_name, **contexts)¶ Set up the controller to handle exceptions with a custom error page.
Note
This decorator is to override the method
write_error.Parameters: - template_name (string) – the name of the template to render.
- contexts (dict) – map of context variables
-
tori.decorator.controller.renderer(*args, **kwargs)¶ Set up the renderer for a controller.
See
tori.template.renderer.Rendererfor more information.