mardi 23 juin 2020

Dynamic file name loading in Flask static subdirectory

I want to access a variable image file at my webpage. My html is as follows:

<img src="">

Through my flask app, I pass this:

return render_template("foo.html", project_name="fooproject")

Nesting within doesn't work. image.jpg file lies in the fooproject directory.




Aucun commentaire:

Enregistrer un commentaire