gestioCOF/gestioncof/cms/translation.py

47 lines
1.1 KiB
Python

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