See #170: use new content obj for channel description

This commit is contained in:
Eliot Berriot 2020-01-15 13:43:25 +01:00
parent e6f8b6e406
commit cfc88847a6
No known key found for this signature in database
GPG key ID: 6B501DFD73514E14
7 changed files with 62 additions and 21 deletions

View file

@ -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):