5👍
✅
You have to define feincms_item_editor_inline
on SimpleTextContent
(docs):
from feincms.admin.item_editor import FeinCMSInline
class SimpleTextInlineAdmin(FeinCMSInline):
fields = ('title', 'text', 'order', 'region')
class SimpleTextContent(RichTextContent):
feincms_item_editor_inline = SimpleTextInlineAdmin
title = models.CharField(max_length=20)
Take care to always include order
and region
, even though they’re not displayed in the admin.
0👍
Does this work?
class SimpleTextContent(RichTextContent):
title = models.CharField(max_length=20)
...
class Meta:
ordering = ['title', 'some_other_field`,]
- [Django]-Deep JSON Serialization of Django objects
- [Django]-Your models have changes that are not yet reflected in a migration
- [Django]-Django Apache wsgi changes python version
- [Django]-Setting up foreignkeys in loaddata for Django
Source:stackexchange.com