Include POS integration web templates, as configured
This commit is contained in:
parent
b0eb941044
commit
9cda5b6ce8
|
@ -33,15 +33,22 @@ def main(global_config, **settings):
|
||||||
"""
|
"""
|
||||||
This function returns a Pyramid WSGI application.
|
This function returns a Pyramid WSGI application.
|
||||||
"""
|
"""
|
||||||
# prefer Theo templates over Tailbone
|
# establish rattail config
|
||||||
settings.setdefault('mako.directories', ['theo.web:templates',
|
rattail_config = app.make_rattail_config(settings)
|
||||||
'tailbone:templates',])
|
|
||||||
|
# which template directories we want depends on integration
|
||||||
|
directories = ['theo.web:templates']
|
||||||
|
if integrate_corepos(rattail_config):
|
||||||
|
directories.append('tailbone_corepos:templates')
|
||||||
|
if integrate_catapult(rattail_config):
|
||||||
|
directories.append('tailbone_onager:templates')
|
||||||
|
directories.append('tailbone:templates')
|
||||||
|
settings.setdefault('mako.directories', directories)
|
||||||
|
|
||||||
# for graceful handling of postgres restart
|
# for graceful handling of postgres restart
|
||||||
settings.setdefault('retry.attempts', 2)
|
settings.setdefault('retry.attempts', 2)
|
||||||
|
|
||||||
# make config objects
|
# establish pyramid config
|
||||||
rattail_config = app.make_rattail_config(settings)
|
|
||||||
pyramid_config = app.make_pyramid_config(settings)
|
pyramid_config = app.make_pyramid_config(settings)
|
||||||
|
|
||||||
# maybe configure integration db connections
|
# maybe configure integration db connections
|
||||||
|
|
Loading…
Reference in a new issue