How To Show The Column Content In Flask_sqlalchemy
I'm trying to understand why I can't see the actual ips that I added in my website, when I use ips = Ip.query.all() and inject it with Jinja I'm getting the following results inst
Solution 1:
with Ip.query.all()
you get a list of all the rows in the database. You can use jinja for loop and iterate over the ips in html.
{% for i in ips %}
{{i.ip_address }}
{% endfor %}
here i
is a single row of database and if you want to print it's id then you will use i.id
Post a Comment for "How To Show The Column Content In Flask_sqlalchemy"