translation.py 442 B

123456789101112131415
  1. from modeltranslation.translator import translator, TranslationOptions
  2. from mezzanine.core.translation import TranslatedRichText
  3. from mezzanine.galleries.models import GalleryImage, Gallery
  4. class TranslatedGallery(TranslatedRichText):
  5. fields = ()
  6. class TranslatedGalleryImage(TranslationOptions):
  7. fields = ('description',)
  8. translator.register(Gallery, TranslatedGallery)
  9. translator.register(GalleryImage, TranslatedGalleryImage)