如何使用flask与Jinja渲染内容?

时间:2020-06-05 13:24:59

标签: python sqlite flask jinja2

我在显示sqlite数据库中某些数据的应用程序中使用Flask。我的问题是应用程序显示的文本中没有定界符'\ n'。例如,一个数据库条目具有以下文本:

Best Chiropractor in Dothan, really helped me with my posture and mood.                

One of the nicest, most knowledgeable doctors that have ever treated me!  One treatment in particular during my first visit changed my life infinitely for the better (not exaggerating).  Thank you Dr.

在网站上

Best Chiropractor in Dothan, really helped me with my posture and mood. One of the nicest, most 
knowledgeable doctors that have ever treated me! One treatment in particular during my first visit 
changed my life infinitely for the better (not exaggerating). Thank you Dr.

神社:

{% if card[11] %}
   <h5 class="font-weight-normal">Reviews</h5>
   <p>{{card[11]}}</p>
{% endif %}

0 个答案:

没有答案