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 infopages.models import InfoPage
8 from catalogue.models import Book, Fragment
10 class InfoPageTranslationOptions(TranslationOptions):
11 fields = ('page_title', 'title', 'left_column', 'right_column')
13 translator.register(InfoPage, InfoPageTranslationOptions)
15 class BookTranslationOptions(TranslationOptions):
16 fields = ('_short_html', )
18 translator.register(Book, BookTranslationOptions)
20 class FragmentTranslationOptions(TranslationOptions):
21 fields = ('_short_html', )
23 translator.register(Fragment, FragmentTranslationOptions)