We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e0958eb commit 5b68d0dCopy full SHA for 5b68d0d
src/dvsim/templates/render.py
@@ -10,6 +10,7 @@
10
11
from collections.abc import Mapping
12
from importlib import resources
13
+from pathlib import Path
14
15
from jinja2 import Environment, PackageLoader, select_autoescape
16
@@ -28,9 +29,11 @@ def render_static(path: str) -> str:
28
29
string containing the static file content
30
31
"""
32
+ full_path = Path("dvsim/templates/static") / path
33
+
34
return resources.read_text(
- "dvsim",
- f"templates/static/{path}",
35
+ ".".join(full_path.parts[:-1]), # Module path
36
+ full_path.name,
37
)
38
39
0 commit comments