Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
SimStadt
simstadtpy
Commits
15ed1284
Commit
15ed1284
authored
Sep 20, 2026
by
Eric Duminil
Browse files
Look for bundled templates too
parent
d17f078f
Changes
1
Show whitespace changes
Inline
Side-by-side
src/simstadt/runner.py
View file @
15ed1284
...
@@ -63,9 +63,12 @@ def get_simstadt_folder() -> Path:
...
@@ -63,9 +63,12 @@ def get_simstadt_folder() -> Path:
def
get_template_path
()
->
Path
:
def
get_template_path
()
->
Path
:
if
"SIMSTADT_TEMPLATE_PATH"
in
os
.
environ
:
if
"SIMSTADT_TEMPLATE_PATH"
in
os
.
environ
:
return
Path
(
os
.
environ
[
"SIMSTADT_TEMPLATE_PATH"
])
return
Path
(
os
.
environ
[
"SIMSTADT_TEMPLATE_PATH"
])
fallback
=
Path
.
cwd
()
/
"templates"
local_templates
=
Path
.
cwd
()
/
"templates"
if
fallback
.
exists
():
if
local_templates
.
exists
():
return
fallback
return
local_templates
bundled
=
Path
(
__file__
).
parent
/
"templates"
if
bundled
.
exists
():
return
bundled
raise
ValueError
(
raise
ValueError
(
"No template path found. Set SIMSTADT_TEMPLATE_PATH or create a templates/ directory."
"No template path found. Set SIMSTADT_TEMPLATE_PATH or create a templates/ directory."
)
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment