Created
November 6, 2017 10:40
-
-
Save benzkji/c9a938da34a9023f4851bd20a642e00a to your computer and use it in GitHub Desktop.
search_indexes_untranslated.py haystack aldryn_search
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from aldryn_search.search_indexes import TitleIndex | |
from cms.models import CMSPlugin | |
from djangocms_misc.global_untranslated_placeholder.utils import get_untranslated_default_language | |
class UntranslatedTitleIndex(TitleIndex): | |
def get_plugin_queryset(self, language): | |
queryset = CMSPlugin.objects.filter( | |
language=get_untranslated_default_language() | |
) | |
return queryset |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment