All theme files elevated to app directory.
This commit is contained in:
parent
4ba16b91a6
commit
de5b4f6ec4
13 changed files with 1 additions and 2 deletions
|
|
@ -229,7 +229,7 @@ def make_app(
|
|||
calculator_templates = Path(__file__).parent / "templates"
|
||||
templates_directories = [cara_templates, calculator_templates]
|
||||
if theme_dir:
|
||||
templates_directories.insert(0, theme_dir / 'templates')
|
||||
templates_directories.insert(0, theme_dir)
|
||||
loader = jinja2.FileSystemLoader([str(path) for path in templates_directories])
|
||||
template_environment = jinja2.Environment(
|
||||
loader=loader,
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@ def main():
|
|||
if theme_dir is not None:
|
||||
theme_dir = Path(theme_dir).absolute()
|
||||
assert theme_dir.exists()
|
||||
assert (theme_dir / 'templates').exists()
|
||||
app = make_app(debug=args.no_debug, calculator_prefix=args.prefix, theme_dir=theme_dir)
|
||||
app.listen(args.port)
|
||||
IOLoop.instance().start()
|
||||
|
|
|
|||
Loading…
Reference in a new issue