{% extends 'base.html' %} {% macro question_entry(question) %}

{{ question.message|safe }}

{% endmacro %} {% macro answer_entry(answer) %}

{{ answer.message|safe }}

{% endmacro %} {% macro comment_entry(comment) %}

{{ comment.message|safe }}

{% endmacro %} {% block main %}

Search results:

...question | ...answer | ...comment

{% for row in data %}
{% if row.data_type == 'question' %} {{ question_entry(row) }} {% endif %} {% if row.data_type == 'answer' %} {{ answer_entry(row) }} {% endif %} {% if row.data_type == 'comment' %} {{ comment_entry(row) }} {% endif %}
{% endfor %} {% endblock %}