feincms / feincms-elephantblog

A blog for FeinCMS
feinheit.ch/labs/
BSD 3-Clause "New" or "Revised" License
43 stars 38 forks source link

entry.first_richtext works only with RichTextContent #50

Open winsento opened 9 years ago

winsento commented 9 years ago

entry.first_richtext does not work if i use the contenttype other than RichTextContent

from redactor.fields import RedactorField
from elephantblog.models import Entry

class Content(models.Model):
    content = RedactorField(u'content', null=True, blank=True)
    class Meta:
        abstract = True
    def render(self, **kwargs):
        return self.content

Entry.create_content_type(Content, regions=('main',))

See pull #49

sbaechler commented 9 years ago

The RichTextContent and MediaFileContent models are hard coded. Maybe we could put the method into a class and make that class replaceable. This way we could use Django Filer or RedactorContents with Elephantblog.