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.
|
||||
"""
|
||||
# prefer Theo templates over Tailbone
|
||||
settings.setdefault('mako.directories', ['theo.web:templates',
|
||||
'tailbone:templates',])
|
||||
# establish rattail config
|
||||
rattail_config = app.make_rattail_config(settings)
|
||||
|
||||
# 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
|
||||
settings.setdefault('retry.attempts', 2)
|
||||
|
||||
# make config objects
|
||||
rattail_config = app.make_rattail_config(settings)
|
||||
# establish pyramid config
|
||||
pyramid_config = app.make_pyramid_config(settings)
|
||||
|
||||
# maybe configure integration db connections
|
||||
|
|
Loading…
Reference in a new issue