Specified ingredients and kitchen utilities as translatable

master
Jim Martens 3 years ago
parent 0b3b344669
commit 227077f49c
  1. 13
      food_planner/translation.py

@ -16,9 +16,14 @@
from modeltranslation import translator
from modeltranslation.translator import TranslationOptions
from food_planner.models import Ingredient, KitchenUtility
# example for translation
# @translator.register(Gender)
# class GenderTranslationOptions(TranslationOptions):
# fields = ('name',)
@translator.register(Ingredient)
class IngredientTranslationOptions(TranslationOptions):
fields = ('name',)
@translator.register(KitchenUtility)
class KitchenUtilityTranslationOptions(TranslationOptions):
fields = ('name',)

Loading…
Cancel
Save