I'm using Django CMS and the Aldryn News Blog app on a client site to display a blog listing. The default template code uses
{% render_model article "lead_in" %}
to display the "Lead in" excerpt text. However it is displaying p tags for me and I actually need them to render.
https://pasteboard.co/GSq8XObQ.png https://pasteboard.co/GSq8ONF.png
I have tried both:
{% autoescape off %}
{% render_model article "lead_in" %}
{% endautoescape %}
{% render_model article "lead_in" |safe %}
The first does nothing and the second errors out. How can I get it to render the html tags?
您是否尝试过此解决方案?
{{ article.lead_in|safe }}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.