kpsul/gestioncof/cms/translation.py
Evarin 0f1e05acdd Migration vers Wagtail 2.3 et Wagtail-modeltranslation 0.9
Toutes les pages Wagtail doivent désormais être traduites
Suppression du modèle COFUtilPage devenu inutile
Réinitialisation des migrations de Wagtail à cause des changements de ModelTranslation
2019-02-04 22:56:48 +01:00

41 lines
842 B
Python

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