def description_summary(self):
lines = self.description.split('\n')
if len(lines) > 0:
first_html = markdown.markdown(lines[0])
first_line = strip_tags(first_html).strip()
if len(first_line) > 140:
first_line = first_line[:140] + '...'
return first_line
else:
return ''
评论列表
文章目录