The solution that I would recommend is switching to asset specs for your templates. They are explicit, allow overriding, and provide better control over your template hierarchy. This means that you would stop using mako.directories
and instead use 'workflow_app1:templates/workflow_app1.mako'
in your inherits
or include
or renderer
arguments. Given this, it's obvious that you can inherit from your base.mako
in your core app, whereas managing the mako.directories
option is more difficult.
If you're deadset on mako.directories
then you can add a line to it every time you add a package to pyramid.includes
.
mako.directores =
App_Core:templates
workflow_app1:templates
workflow_app2:templates
Another option is to switch to jinja2, as its plugin has the ability to add search paths after the fact. Thus your included modules can config.add_jinja2_search_path(...)
throwing themselves into the lookup order. Pyramid's mako integration does not offer this option right now.