📅  最后修改于: 2022-03-11 14:45:38.588000             🧑  作者: Mango
{{ model.field|truncatewords:30 }}
# Example below returns just the first 30 words of the text_summary column
# (for each line/book in the books table)
{% for book in books.all %}
- {{ book.text_summary|truncatewords:30 }}
{% endfor %}