{% load cache %} {% load util %} {% load ratings %} {% if sound %} {% comment %} If you change this cache index, be sure to change the invalidation in ratings/views.py as well {% endcomment %} {% cache 43200 display_sound sound_id request.user.is_authenticated sound.processing_state sound.moderation_state request.user.profile.is_adult %}
{{sound.description|striptags|safe|truncatewords:20}}
{% if sound.processing_state != 'OK' %}
Processing state:
{% if sound.processing_state == 'PE' %}
Pending
{% else %}
{% if sound.processing_state == 'QU' %}
Queued
{% else %}
{% if sound.processing_state == 'FA' %}
Failed
{% else %}
{% if sound.processing_state == 'PR' %}
Processing
{% else %}
{{sound.processing_state}}
{% endif %}
{% endif %}
{% endif %}
{% endif %}
{% endif %}
{% if sound.moderation_state != 'OK' %}
Moderation state:
{% if sound.moderation_state == 'PE' %}
Pending
{% elif sound.moderation_state == 'DE' %}
Deferred
{% else %}
{{sound.moderation_state}}
{% endif %}
{% endif %}
{% endif %}