gestioCOF/gestioncof/cms/translation.py
2018-01-22 21:24:20 +01:00

41 lines
957 B
Python

from .models import COFRootPage, COFPage, 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(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',
)