mirror of
https://github.com/jointakahe/takahe.git
synced 2025-02-18 00:25:20 +00:00
parent
0fc8ff4965
commit
15159418df
1 changed files with 3 additions and 2 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
import hashlib
|
||||||
import re
|
import re
|
||||||
from collections.abc import Iterable
|
from collections.abc import Iterable
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
@ -10,7 +11,7 @@ from django.contrib.postgres.indexes import GinIndex
|
||||||
from django.db import models, transaction
|
from django.db import models, transaction
|
||||||
from django.template import loader
|
from django.template import loader
|
||||||
from django.template.defaultfilters import linebreaks_filter
|
from django.template.defaultfilters import linebreaks_filter
|
||||||
from django.utils import text, timezone
|
from django.utils import timezone
|
||||||
|
|
||||||
from activities.models.emoji import Emoji
|
from activities.models.emoji import Emoji
|
||||||
from activities.models.fan_out import FanOut
|
from activities.models.fan_out import FanOut
|
||||||
|
@ -405,7 +406,7 @@ class Post(StatorModel):
|
||||||
"""
|
"""
|
||||||
if not self.summary:
|
if not self.summary:
|
||||||
return ""
|
return ""
|
||||||
return "summary-" + text.slugify(self.summary, allow_unicode=True)
|
return "summary-" + hashlib.md5(self.summary.encode("utf8")).hexdigest()
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def stats_with_defaults(self):
|
def stats_with_defaults(self):
|
||||||
|
|
Loading…
Reference in a new issue