Skip to content

Commit

Permalink
模板中显示评论被 markdown 渲染后的内容
Browse files Browse the repository at this point in the history
  • Loading branch information
zmrenwu committed Oct 30, 2018
1 parent 8d8b1df commit 313818b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -8,7 +8,7 @@
<div id="c{{ mpttcomment.id }}">
{{ mpttcomment.submit_date }} - {{ mpttcomment.name }}
</div>
<p>{{ mpttcomment.comment }}</p>
<p>{{ mpttcomment.comment_html|safe }}</p>
<br>
{% include 'comments/form.html' with form=form %}
</body>
Expand Down
2 changes: 1 addition & 1 deletion example/templates/comments/list.html
Expand Up @@ -6,7 +6,7 @@
{{ node.submit_date }} - {{ node.name }} <a href="{% url 'mptt_comments_reply' node.pk %}">reply</a>
</dt>
<dd>
<p>{{ node.comment }}</p>
<p>{{ node.comment_html|safe }}</p>
</dd>
{% if not node.is_leaf_node %}
<dl class="children" style="margin-left: 40px">
Expand Down

0 comments on commit 313818b

Please sign in to comment.