X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/56a76b9dc0745d22d9b1eac54348d6109dc3c0e1..9e621499c65fcb873d2963c7da13be76d6aff825:/src/funding/translation.py?ds=inline diff --git a/src/funding/translation.py b/src/funding/translation.py new file mode 100644 index 000000000..f8d6c0f4f --- /dev/null +++ b/src/funding/translation.py @@ -0,0 +1,20 @@ +# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# + +from modeltranslation.translator import translator, TranslationOptions +from . import models + + +class OfferTranslationOptions(TranslationOptions): + fields = ('description',) + + +translator.register(models.Offer, OfferTranslationOptions) + + +class PerkTranslationOptions(TranslationOptions): + fields = ('name', 'long_name') + + +translator.register(models.Perk, PerkTranslationOptions)