blob: 9d5c01ce91f88c0df9bc3dec7e84e0a8fc6f39b8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
from django.db import models
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext_lazy as _
class RichTextContent(models.Model):
text = models.TextField(_('text'), blank=True)
class Meta:
abstract = True
verbose_name = _('rich text')
verbose_name_plural = _('rich texts')
def render(self, **kwargs):
return mark_safe(self.text)
|