gestioCOF/gestioncof/cms/translation.py
2019-01-06 00:37:08 +01:00

41 lines
899 B
Python

from modeltranslation.decorators import register
from wagtail_modeltranslation.translator import WagtailTranslationOptions
from .models import (
COFActuIndexPage,
COFActuPage,
COFDirectoryEntryPage,
COFDirectoryPage,
COFPage,
COFRootPage,
)
@register(COFRootPage)
class COFRootPageTr(WagtailTranslationOptions):
fields = ("introduction",)
@register(COFPage)
class COFPageTr(WagtailTranslationOptions):
fields = ("body",)
@register(COFActuIndexPage)
class COFActuIndexPageTr(WagtailTranslationOptions):
fields = ()
@register(COFActuPage)
class COFActuPageTr(WagtailTranslationOptions):
fields = ("chapo", "body")
@register(COFDirectoryPage)
class COFDirectoryPageTr(WagtailTranslationOptions):
fields = ("introduction",)
@register(COFDirectoryEntryPage)
class COFDirectoryEntryPageTr(WagtailTranslationOptions):
fields = ("body", "links")