2024-05-23 17:13:36 发布
网友
我的Django模板中有这样一个字段:
<p>{{news.description}}<p>
我想展示这个领域的前50个单词。我该怎么做?
来自the documentation:
{{ news.description|truncatewords:50 }}
来自the documentation:
相关问题 更多 >
编程相关推荐