.get_template() not work with path Windows slashes (\).
Gdahuks opened this issue · comments
Jinja does not always recognize Windows slashes (). This kind of slash is returned when you use Windows os.path.join()
from jinja2 import Environment, FileSystemLoader
env = Environment(
loader= FileSystemLoader("here\\windows\\slashes\\work")
)
template = env.get_template("here\\windows\\slashes\\NOT\\work.jinja")
.get_template()
should work even if the path is defined in Windows format (if the Windows system is used). I will prepare PR fixing this issue by myself.
Environment:
- Python version: 3.9.13
- Jinja version: 3.1.2