comparison libervia/server/server.py @ 1293:de3b15d68bb6

pages: expose `templates_root_url` to scripts
author Goffi <goffi@goffi.org>
date Fri, 19 Jun 2020 16:47:51 +0200
parents e30e96958fb7
children db9ea167c409
comparison
equal deleted inserted replaced
1292:e30e96958fb7 1293:de3b15d68bb6
240 240
241 params are the same as for [Libervia.getConfig] 241 params are the same as for [Libervia.getConfig]
242 """ 242 """
243 return self.host.getConfig(self, key, default, value_type) 243 return self.host.getConfig(self, key, default, value_type)
244 244
245 def getFrontURL(self, theme):
246 return Path(
247 '/',
248 C.TPL_RESOURCE,
249 self.site_name or C.SITE_NAME_DEFAULT,
250 C.TEMPLATE_TPL_DIR,
251 theme)
245 252
246 def _initRedirections(self, options): 253 def _initRedirections(self, options):
247 url_redirections = options["url_redirections_dict"] 254 url_redirections = options["url_redirections_dict"]
248 255
249 url_redirections = url_redirections.get(self.site_name, {}) 256 url_redirections = url_redirections.get(self.site_name, {})