This repository has been archived by the owner on Feb 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Flask: Jinja doesn't support absolute file paths #10
Comments
jyn514
changed the title
git: Jinja doesn't support absolute file paths
Flask: Jinja doesn't support absolute file paths
Apr 20, 2018
My fix was to just pass the file texts as a string. No code file should be so long that it’s a huge issue at least for now. (Since our purpose is instruction) |
This doesn't work for any sort of binary file. I know this is primarily for instruction, but it will crash on pictures, databases, anything that isn't valid unicode. Traceback:
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Docs
I was trying to run
{% include <filepath> %}
intemplates/index.html
. Unfortunately,jinja
gives an error that the file doesn't exist even when it's there because it doesn't support arbitrary file paths. My current workaround is to putln -s / root
intemplates
and{% include 'root/' + <filepath> %}
, which is hardly ideal.The easiest way to fix this is just have snaps in the working directory, but I like the idea of having a global cache. Still considering how to implement this.
Traceback
The text was updated successfully, but these errors were encountered: