Im working on the comment section of my page and found a useful website with this https://blog.miguelgrinberg.com/post/implementing-user-comments-with-sqlalchemy. The problem i am having is representing the comments on the website. How to i display nested comments in the same manner as shown in the link above using the flask code below.
for comment in Comment.query.order_by(Comment.path):
print('{}{}: {}'.format(' ' * comment.level(), comment.author, comment.text))
In other words: how would the above segment look as jinja code.
{% for comment in comments %]
.
.
.
{% endfor %}
If there is another way to do it, i'm all ears. Thanks.