show brief in collection post
This commit is contained in:
parent
c7445f8f61
commit
6dc678a75d
2 changed files with 4 additions and 2 deletions
|
@ -52,7 +52,7 @@ class Collection(List):
|
|||
return html
|
||||
|
||||
@property
|
||||
def plain_description(self):
|
||||
def plain_content(self):
|
||||
html = render_md(self.brief)
|
||||
return _RE_HTML_TAG.sub(" ", html)
|
||||
|
||||
|
|
|
@ -549,7 +549,9 @@ class Takahe:
|
|||
category = "收藏单"
|
||||
item_link = collection.absolute_url
|
||||
pre_conetent = f'{action_label}{category}<a href="{item_link}">《{collection.title}》</a><br>'
|
||||
content = ""
|
||||
content = collection.plain_content
|
||||
if len(content) > 360:
|
||||
content = content[:357] + "..."
|
||||
data = {
|
||||
"object": {
|
||||
# "tag": [item.ap_object_ref for item in collection.items],
|
||||
|
|
Loading…
Add table
Reference in a new issue