Only configure exception view when running in production
apparently that supresses normal traceback on console even..
This commit is contained in:
parent
7463d4e092
commit
73c0d02b9a
|
@ -117,11 +117,13 @@ 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
|
||||
if rattail_config.production():
|
||||
config.add_exception_view(cls, attr='exception', renderer='/exception.mako')
|
||||
|
||||
# home
|
||||
|
|
Loading…
Reference in a new issue