Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我在 django 管理页面的文本字段中编写 html 标签并在我自己的视图中显示它们时,不会评估 html 标签。有没有办法这样做?
在您的模板中,使用安全:
{{ myobj.html_field|safe }}
safe在模板中使用过滤器:
safe
{{object.body|safe}}