mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-03 20:39:16 +02:00
See #170: use new content obj for channel description
This commit is contained in:
parent
e6f8b6e406
commit
cfc88847a6
7 changed files with 62 additions and 21 deletions
|
@ -289,6 +289,12 @@ class Content(models.Model):
|
|||
text = models.CharField(max_length=CONTENT_TEXT_MAX_LENGTH, blank=True, null=True)
|
||||
content_type = models.CharField(max_length=100)
|
||||
|
||||
@property
|
||||
def rendered(self):
|
||||
from . import utils
|
||||
|
||||
return utils.render_html(self.text, self.content_type)
|
||||
|
||||
|
||||
@receiver(models.signals.post_save, sender=Attachment)
|
||||
def warm_attachment_thumbnails(sender, instance, **kwargs):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue