Coverage for /home/runner/work/viur-core/viur-core/viur/src/viur/core/modules/site.py: 0%
14 statements
« prev ^ index » next coverage.py v7.6.3, created at 2024-10-16 22:16 +0000
« prev ^ index » next coverage.py v7.6.3, created at 2024-10-16 22:16 +0000
1from viur.core import Module, errors
2from viur.core.decorators import exposed
5class Site(Module):
6 adminInfo = None
8 @exposed
9 def index(self, template="index", *arg, **kwargs):
10 if ".." in template or "/" in template:
11 return
13 try:
14 template = self.render.getEnv().get_template(self.render.getTemplateFileName("sites/" + template))
15 except:
16 raise errors.NotFound()
18 return template.render()
21Site.html = True