Added abs_url() Jinja function for proper absolute URLs

abs_url(x) is a shortcut for url_for(x, _external=True,
 _schema=app.config['SCHEMA']), and should be used for all URLs that should
include the hostname and schema.
This commit is contained in:
2017-12-21 12:58:06 +01:00
parent b7bf29c06e
commit ef1609efc2
2 changed files with 6 additions and 2 deletions

View File

@@ -425,7 +425,7 @@ class PillarServer(BlinkerCompatibleEve):
custom_jinja_loader = jinja2.ChoiceLoader(paths_list)
self.jinja_loader = custom_jinja_loader
pillar.web.jinja.setup_jinja_env(self.jinja_env)
pillar.web.jinja.setup_jinja_env(self.jinja_env, self.config)
# Register context processors from extensions
for ext in self.pillar_extensions.values():