{% extends "base.html" %} {% load staticfiles %} {% block title %}Triodia - Query{% endblock %} {% block head %} {% endblock %} {% block scripts %} {% endblock %} {% block content %}
Make a query
{% csrf_token %} {{ query_form }}
{% if query %}

{{ query }}

Kingdom: {{ query.kingdom }}
Accessed: {{ query.times_accessed }} times
{% endif %}

Results

{% if results == 'Phrasename' %} That looks like a phrase name. Unfortunately, we don't support searching for phrase names at this stage. {% elif results == 'Timeout' %} Sorry, it looks like we're having some network trouble. Try again in a few minutes. {% elif results %} {% if results.0.matchtype == 'exact' or results.0.matchtype == 'fuzzy' or results.0.matchtype == 'synonym' %} {% if results.0.matchtype == 'exact' %}
Looks like you got a good match:
{% elif results.0.matchtype == 'fuzzy' %}
We couldn't find the exact search term you used, but this is the closest match:
{% elif results.0.matchtype == 'synonym' %}
It looks like the taxon you searched for might have had a name change. Here's the new name:
{% endif %}

{{ results.0.taxon.name }}

Rank: {{results.0.taxon.rank}} - Kingdom: {{ results.0.taxon.kingdom }} - {{ results.0.confidence }}% confidence

{% if results.0.matchtype == 'synonym' %}

Old name: {{ results.0.response.text.canonicalName}}

{% endif %}
{% endif %} {% with results|length as count %} {% if count > 1 %}
We found {{ count }} alternative result{{count|pluralize}}:
{% with results|last as last %} {% if last.confidence < 50 %} Show more... {% endif %} {% endwith %} {% endif %} {% endwith %} {% else %} Sorry, there were no results for that search term. {% endif %}
{% endblock %}