489 logoimg = config('web', 'logoimg', 'hglogo.png') |
489 logoimg = config('web', 'logoimg', 'hglogo.png') |
490 staticurl = config('web', 'staticurl') or url + 'static/' |
490 staticurl = config('web', 'staticurl') or url + 'static/' |
491 if not staticurl.endswith('/'): |
491 if not staticurl.endswith('/'): |
492 staticurl += '/' |
492 staticurl += '/' |
493 |
493 |
494 tmpl = templater.templater(mapfile, |
494 defaults = { |
495 defaults={"encoding": encoding.encoding, |
495 "encoding": encoding.encoding, |
496 "motd": motd, |
496 "motd": motd, |
497 "url": url, |
497 "url": url, |
498 "logourl": logourl, |
498 "logourl": logourl, |
499 "logoimg": logoimg, |
499 "logoimg": logoimg, |
500 "staticurl": staticurl, |
500 "staticurl": staticurl, |
501 "sessionvars": sessionvars, |
501 "sessionvars": sessionvars, |
502 "style": style, |
502 "style": style, |
503 }) |
503 } |
|
504 tmpl = templater.templater.frommapfile(mapfile, defaults=defaults) |
504 return tmpl |
505 return tmpl |
505 |
506 |
506 def updatereqenv(self, env): |
507 def updatereqenv(self, env): |
507 if self._baseurl is not None: |
508 if self._baseurl is not None: |
508 name, port, path = geturlcgivars(self._baseurl, env['SERVER_PORT']) |
509 name, port, path = geturlcgivars(self._baseurl, env['SERVER_PORT']) |