Skip to content

Tag: jinja2

Send query params from Jinja template

I can’t figure out if it’s possible to pass query parameters from a static html page to a view for processing. I have now implemented the functionality I need using path parameters. I want to do the same, but with query parameters main.py events.py routes.py html It’s works with “POST …

How to Use jinja to render HTML without flask?

I need to render HTML page using jinja but without flask I read some other questions here but none had clear answer kindly let me know how can i achieve the same Here I need to render 1.html using 1.py – is it possble to do it in ofline mode current 1.py currently with this I am able to print

Images not hosted on server with flask, jinja2 and html

I want to load images from links with flask and jinja2. This is what I’m trying: I have checked that anime.cover = https://animeflv.net/uploads/animes/covers/2430.jpg, but the images won’t load. What is a possible solution? Thank you in advance! Answer First check to make sure you’re getting…

How can Jinja2 read a function without passing it explicitly?

In the flask:flashing documentation, I encounter the following situation. And here is the Jinja2 used HTML file. So I wonder that even if there is no function passed in to the HTML file by using return statement in Python file, Jinja2 can read get_flashed_messages() function, which is a function under the fla…