You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not only is PackageLoader more difficult to intuit on first reading, but FileSystemLoader is mentioned in the Loaders API as the preferred way to load templates from the file system.
The text was updated successfully, but these errors were encountered:
I think it's preferable to load templates relative to the project they live in. You give it the name of your package or module, create a templates folder, and you're done.
FileSystemLoader comes with its own set of behaviors. If you specify relative paths, it's dependent on the current working directory when the project is run. If you specify absolute paths, you need to do stuff with os.path and __file__ to make them absolute relative to the project, in which case you might as well use PackageLoader.
Every time I visit this page, I'm momentarily confused, then realize it's introducing the PackageLoader instead of FileSystemLoader:
http://jinja.pocoo.org/docs/api/
Not only is PackageLoader more difficult to intuit on first reading, but FileSystemLoader is mentioned in the Loaders API as the preferred way to load templates from the file system.
The text was updated successfully, but these errors were encountered: