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.Renderer for more information.

Project Versions

Previous topic

tori.decorator.common

Next topic

tori.exception

This Page