From 73c0d02b9a86fb5d1ac810bbe9d72de1127462ec Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Tue, 28 Mar 2017 00:54:21 -0500 Subject: [PATCH] Only configure exception view when running in production apparently that supresses normal traceback on console even.. --- tailbone/views/common.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tailbone/views/common.py b/tailbone/views/common.py index 43ec7f8f..f72b01e4 100644 --- a/tailbone/views/common.py +++ b/tailbone/views/common.py @@ -117,12 +117,14 @@ class CommonView(View): @classmethod def defaults(cls, config): + rattail_config = config.registry.settings['rattail_config'] # auto-correct URLs which require trailing slash config.add_notfound_view(cls, attr='notfound', append_slash=True) # exception - config.add_exception_view(cls, attr='exception', renderer='/exception.mako') + if rattail_config.production(): + config.add_exception_view(cls, attr='exception', renderer='/exception.mako') # home config.add_route('home', '/')