

def render_placeholder_search_text(placeholder, fallback_language=None):
    '\n    Render a :class:`~fluent_contents.models.Placeholder` object to search text.\n    This text can be used by an indexer (e.g. haystack) to produce content search for a parent object.\n\n    :param placeholder: The placeholder object.\n    :type placeholder: :class:`~fluent_contents.models.Placeholder`\n    :param fallback_language: The fallback language to use if there are no items in the current language.\n                              Passing ``True`` uses the default :ref:`FLUENT_CONTENTS_DEFAULT_LANGUAGE_CODE`.\n    :type fallback_language: bool|str\n    :rtype: str\n    '
    parent_object = placeholder.parent
    language = get_parent_language_code(parent_object)
    output = SearchRenderingPipe(language).render_placeholder(placeholder=placeholder, parent_object=parent_object, fallback_language=fallback_language)
    return output.html

dataset/ETHPy150Open edoburu/django-fluent-contents/fluent_contents/rendering/main.py render_placeholder_search_text/original