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
10 class TagTranslationOptions(TranslationOptions):
11 fields = ('name', 'description', 'wiki_link')
14 class CollectionTranslationOptions(TranslationOptions):
15 fields = ('title', 'description')
18 class SourceTranslationOptions(TranslationOptions):
21 translator.register(Tag, TagTranslationOptions)
22 translator.register(Collection, CollectionTranslationOptions)
23 translator.register(Source, SourceTranslationOptions)