我想在模板变量中加入html片段。像这样:
>>>t = django.template.Template("<ul>{{ title }}<\ul>: {{ story }}")
>>>c = django.template.Context({"title":"This is the title",r"Line 1.<br />Line 2."})
>>>print t.render(c)
<ul>This is the title<\ul>: Line 1.<br />Line 2.
我期望输出像这样:
<ul>This is the title<\ul>: Line 1.<br />Line 2.
如何在模板变量中输入HTML?