核心问题是wagtail
RichTextField
和StreamField
的处理在模板中完全不同。
我试图完成类似以下的事情:
{% with post=post.specific %}
{% if post.content_type == 'streamfield' %}
{% include_block post.body %}
{% else %}
{{ post.body|richtext }}
{% endif %}
{% endwith %}