1 # -*- coding: utf-8 -*-
2 # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
3 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
6 from modeltranslation.translator import translator, TranslationOptions
7 from catalogue.models import Collection, Tag
8 from infopages.models import InfoPage
10 class InfoPageTranslationOptions(TranslationOptions):
11 fields = ('title', 'left_column', 'right_column')
13 class TagTranslationOptions(TranslationOptions):
14 fields = ('name', 'description', 'wiki_link')
16 class CollectionTranslationOptions(TranslationOptions):
17 fields = ('title', 'description')
19 translator.register(InfoPage, InfoPageTranslationOptions)
20 translator.register(Tag, TagTranslationOptions)
21 translator.register(Collection, CollectionTranslationOptions)