Commit 26882d73 authored by fred's avatar fred
Browse files

performance: use stored fields for search results

parent 445986d6
<a href="{% url 'emission-view' slug=result.object.slug %}">
<a href="{% url 'emission-view' slug=result.slug %}">
<span class="icon-microphone" ></span>
<strong>{{ result.object.title }}</strong>
<strong>{{ result.title }}</strong>
<br />
<span>{% if result.object.subtitle %}{{ result.object.subtitle }}{% else %} {% endif %}</span>
<span>{% if result.subtitle %}{{ result.subtitle }}{% else %} {% endif %}</span>
</a>
<a href="{% url 'episode-view' emission_slug=result.object.emission.slug slug=result.object.slug %}">
<a href="{% url 'episode-view' emission_slug=result.emission_slug slug=result.slug %}">
<span class="icon-volume-off " ></span>
<strong>{{ result.object.title }}</strong>
<strong>{{ result.title }}</strong>
<br />
<span class="smooth">{{ result.object.emission.title }}</span>
<span class="smooth">{{ result.emission_title }}</span>
</a>
......@@ -6,7 +6,7 @@
<ul id="search-results" class="list columns padded cf">
{% for result in more_like_this %}
{% if result.object.title %}
{% if result.title %}
<li class="ellipsis">
{% search_result_template result %}
</li>
......
<a href="{% url 'news-view' slug=result.object.slug %}">
<a href="{% url 'news-view' slug=result.slug %}">
<span class="icon-bullhorn" ></span>
<strong>{{ result.object.title }}</strong>
{% if result.object.date %}
<div class="smooth">{{ result.object.date|date:"D m/M"|lower }}</div>
<strong>{{ result.title }}</strong>
{% if result.date %}
<div class="smooth">{{ result.date|date:"D m/M"|lower }}</div>
{% endif %}
</a>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment