[Django]-Reorder Fields of FeinCMS Content Type in Page Admin

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.

👤Jonas

0👍

Does this work?

class SimpleTextContent(RichTextContent):
    title = models.CharField(max_length=20)
    ...
    class Meta:
         ordering = ['title', 'some_other_field`,]
👤Newtt

Leave a comment