# Path: simple_cms/contrib/translated_model/models.py
# class Language(CommonAbstractModel):
#     name = models.CharField(max_length=255, unique=True)
#     code = models.CharField(max_length=10, unique=True)
#     display_name = models.CharField(max_length=255, blank=True, default='')
#     order = PositionField()
#     
#     class Meta:
#         ordering = ['order']
#     
#     @property
#     def title(self):
#         if self.display_name:
#             return self.display_name
#         return self.name
# 
#     def __unicode__(self):
#         return u'%s' % self.name


from pysolr import SolrError
from haystack.backends.solr_backend import SolrSearchBackend, SolrSearchQuery
from haystack.backends import BaseEngine
from haystack.utils import get_identifier
from simple_cms.contrib.translated_model.models import Language

class MultiLanguageSolrBackend(SolrSearchBackend):
    def update(self, index, iterable, commit=True):
        docs = []

        for language in Language.objects.get_active():
            for obj in iterable:

# Path: simple_cms/contrib/translated_model/models.py
# class Language(CommonAbstractModel):
#     name = models.CharField(max_length=255, unique=True)
#     code = models.CharField(max_length=10, unique=True)
#     display_name = models.CharField(max_length=255, blank=True, default='')
#     order = PositionField()
#     
#     class Meta:
#         ordering = ['order']
#     
#     @property
#     def title(self):
#         if self.display_name:
#             return self.display_name
#         return self.name
# 
#     def __unicode__(self):
#         return u'%s' % self.name


# Path: simple_cms/contrib/translated_model/haystack/solr.py
from pysolr import SolrError
from haystack.backends.solr_backend import SolrSearchBackend, SolrSearchQuery
from haystack.backends import BaseEngine
from haystack.utils import get_identifier
from simple_cms.contrib.translated_model.models import Language


class MultiLanguageSolrBackend(SolrSearchBackend):
    def update(self, index, iterable, commit=True):
        docs = []

        for language in Language.objects.get_active():
            for obj in iterable:

                try: