{% extends "projects/base_project.html" %} {% load core_tags i18n static %} {% block title %} {% blocktrans with query=query|default:"" %} Search: {{ query }} {% endblocktrans %} {% endblock %} {% block extra_links %} {{ super }} {% endblock %} {% block content-header %} {% if project_obj %} {% with search_active="active" project=project_obj %} {% include "projects/partials/header.html" %} {% endwith %} {% endif %} {% endblock %} {% block content %}
{% if 'project' in result.meta.index %} {{ result.name }} ({{ result.slug }}) {% for fragment in result.meta.highlight.description %}
...{{ fragment|safe }}...
{% empty %}No description for project.
{% endfor %} {% elif 'page' in result.meta.index %} {% with "100" as MAX_SUBSTRING_LIMIT %} {{ result.project }} - {% if result.meta.highlight.title %} {{ result.meta.highlight.title.0|safe }} {% else %} {{ result.title }} {% endif %} {% for inner_hit in result.meta.inner_hits %} {% if inner_hit.type == 'domains' %}{% if inner_hit.highlight|get_key_or_none:"domains.docstrings" %} {% with domain_docstrings=inner_hit.highlight|get_key_or_none:"domains.docstrings" %} {{ domain_docstrings.0|safe }} {% endwith %} {% else %} {% if inner_hit.source.docstrings %} {{ inner_hit.source.docstrings|slice:MAX_SUBSTRING_LIMIT }} ... {% endif %} {% endif %}
{% elif inner_hit.type == 'sections' %} {% if inner_hit.highlight|get_key_or_none:"sections.content" %} {% with section_content=inner_hit.highlight|get_key_or_none:"sections.content" %} {% for content in section_content %}... {{ content|safe }} ...
{% endfor %} {% endwith %} {% else %}{{ inner_hit.source.content|slice:MAX_SUBSTRING_LIMIT }} ...
{% endif %} {% endif %} {% endfor %} {% endwith %} {% endif %}