1 # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
2 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
5 from modeltranslation.translator import translator, TranslationOptions
6 from catalogue.models import Collection, Tag, Source
9 class TagTranslationOptions(TranslationOptions):
10 fields = ('name', 'description', 'wiki_link')
13 class CollectionTranslationOptions(TranslationOptions):
14 fields = ('title', 'description')
17 class SourceTranslationOptions(TranslationOptions):
20 translator.register(Tag, TagTranslationOptions)
21 translator.register(Collection, CollectionTranslationOptions)
22 translator.register(Source, SourceTranslationOptions)