I'm using the wagtailmenus library with some custom models as described here. Nothing major, it just adds a language field:
class TranslatableFlatMenu(AbstractFlatMenu):
language = models.CharField(choices=TRANSLATION_CHOICES, help_text='For what language the menu should be used', max_length=13)
content_panels = (
MultiFieldPanel(
heading=_("Menu Details"),
children=(
FieldPanel("title"),
FieldPanel("site"),
FieldPanel("handle"),
FieldPanel("heading"),
FieldPanel("language"),
)
),
FlatMenuItemsInlinePanel(),
)
class TranslatableFlatMenuItem(AbstractFlatMenuItem):
menu = ParentalKey(
TranslatableFlatMenu,
on_delete=models.CASCADE,
related_name=settings.FLAT_MENU_ITEMS_RELATED_NAME,
)
This works great, however I would like to display the field here:
Now for regular models I can use ModelAdmin and pass list_display
, but wagtailmenus seems to already register the menus itself. Is it possible to still change the list_display
property somehow so I can display the language in the list?