开发者

Django textarea widget <p>

开发者 https://www.devze.com 2023-01-21 17:05 出处:网络
In django admin I am using the textarea widget. When I save data, it is saved inside a <p></p>开发者_StackOverflow; tag.

In django admin I am using the textarea widget.

When I save data, it is saved inside a <p></p>开发者_StackOverflow; tag.

I dont want this - any solutions, I just want to get the data out without being wrapped in a <p>.

Any suggestions?


I don't know how to save it without html coding, but maybe it is enough to you to display without that

. Just put a |safe in the template after the variable name, example:

{{ variable|safe }}

http://docs.djangoproject.com/en/dev/ref/templates/builtins/?from=olddocs

0

精彩评论

暂无评论...
验证码 换一张
取 消