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', '/')