技术Django模板内的字符串截取django模板内的字符串截取1,变量前30个字符,用于中文不行{{ content |truncatewords:"30"}} 取变量前500个字符,可用于中文{{ content |slice:"30" }}