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, Source
9 class TagTranslationOptions(TranslationOptions):
10 fields = ('name', 'description', 'wiki_link')
12 class CollectionTranslationOptions(TranslationOptions):
13 fields = ('title', 'description')
15 class SourceTranslationOptions(TranslationOptions):
18 translator.register(Tag, TagTranslationOptions)
19 translator.register(Collection, CollectionTranslationOptions)
20 translator.register(Source, SourceTranslationOptions)