gestioCOF/gestioncof/cms/translation.py
2019-01-06 00:17:57 +01:00

54 lines
992 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',
)