pallets / jinja

A very fast and expressive template engine.
https://jinja.palletsprojects.com
BSD 3-Clause "New" or "Revised" License
10.25k stars 1.6k forks source link

TemplateNotFound on Window OS #2009

Closed jgauby closed 1 month ago

jgauby commented 1 month ago

On Window, this line fails : https://github.com/pallets/jinja/blob/main/src/jinja2/loaders.py#L30

The path separator on Window is \

Jinja version 3.1.4

ThiefMaster commented 1 month ago

Forward slashes are perfectly fine and valid on Windows.

And template paths are not filesystem paths even though they may map to such paths. They always use forward slashes.

jgauby commented 1 month ago

Okay thanks, it must be the mix between the / and \ that are failing the search for my template file.