translation.py 553 B

1234567891011121314151617
  1. from modeltranslation.translator import translator
  2. from mezzanine.core.translation import (TranslatedSlugged,
  3. TranslatedDisplayable,
  4. TranslatedRichText)
  5. from mezzanine.blog.models import BlogCategory, BlogPost
  6. class TranslatedBlogPost(TranslatedDisplayable, TranslatedRichText):
  7. fields = ()
  8. class TranslatedBlogCategory(TranslatedSlugged):
  9. fields = ()
  10. translator.register(BlogCategory, TranslatedBlogCategory)
  11. translator.register(BlogPost, TranslatedBlogPost)