Turbogears2 migration: custom error pages

Thomas De Schampheleire patrickdepinguin at gmail.com
Tue May 24 07:58:18 UTC 2016


On Tue, May 24, 2016 at 8:38 AM, Alessandro Molina
<alessandro.molina at gmail.com> wrote:
> You probably just have to add 400 to errorpage.status_codes option in config
>
> See
> http://turbogears.readthedocs.io/en/latest/reference/config-options.html#tg.appwrappers.errorpage.ErrorPageApplicationWrapper
>

Indeed, thanks, added these lines:

diff --git a/kallithea/config/app_cfg.py b/kallithea/config/app_cfg.py
--- a/kallithea/config/app_cfg.py
+++ b/kallithea/config/app_cfg.py
@@ -78,6 +78,9 @@ base_config.DBSession = kallithea.model.
 # Configure App without an authentication backend.
 base_config.auth_backend = None

+# Configure ErrorPage behavior
+base_config['errorpage.status_codes'] = [400, 401, 403, 404]
+
 try:
     # Enable DebugBar if available, install tgext.debugbar to turn it on
     from tgext.debugbar import enable_debugbar


More information about the kallithea-general mailing list