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,12 +117,14 @@ class CommonView(View):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def defaults(cls, config):
|
def defaults(cls, config):
|
||||||
|
rattail_config = config.registry.settings['rattail_config']
|
||||||
|
|
||||||
# auto-correct URLs which require trailing slash
|
# auto-correct URLs which require trailing slash
|
||||||
config.add_notfound_view(cls, attr='notfound', append_slash=True)
|
config.add_notfound_view(cls, attr='notfound', append_slash=True)
|
||||||
|
|
||||||
# exception
|
# 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
|
# home
|
||||||
config.add_route('home', '/')
|
config.add_route('home', '/')
|
||||||
|
|
Loading…
Reference in a new issue