from organization.media.models import *
from organization.core.views import *
-from organization.core.utils import *
from dal import autocomplete
from dal_select2_queryset_sequence.views import Select2QuerySetSequenceView
from mezzanine_agenda.models import Event
--- /dev/null
+<audio preload="true"></audio>
+<ol class="audio-playlist">
+
+ {% for audio in object %}
+
+ <li class="audio-playlist__item">
+ <a href="#" data-src="{{ audio.open_source_url }}">{{ audio.title }}</a>
+ </li>
+
+ {% comment %}
+
+ {# audio.title #}<br>
+ {# audio.open_source_mime_type #}<br>
+ {# audio.closed_source_mime_type #}<br>
+ {# audio.category #}<br>
+ {# audio.media_id #}<br>
+ {# audio.open_source_url #}<br>
+ {# audio.closed_source_url #}<br>
+ {# audio.poster_url #}<br>
+ <audio>
+ <source src="{{ audio.open_source_url }}" type="{{ audio.open_source_mime_type }}">
+ <source src="{{ audio.closed_source_mime_type }}" type="{{ audio.closed_source_url }}">
+ Your browser does not support the audio element.
+ </audio>
+
+ {% endcomment %}
+
+ {% endfor %}
+
+</ol>
{% block page_content %}
-{% for m in media %}
- {{ m|classname }} : {{ m.created_at }} : {{ m.title }}
- <br>
-{% endfor %}
+ {% for object in media %}
+ {% with object|classname|lower as class_name %}
+ {% with "media/"|add:class_name|add:"/inc/"|add:class_name|add:"_card.html" as template %}
+ {% include template %}
+ {% endwith %}
+ {% endwith %}
+ {{ m|classname }} : {{ m.created_at }} : {{ m.title }}
+ <br>
+ {% endfor %}
{% endblock %}
--- /dev/null
+{% for video in videos %}
+ {% comment %}
+ {# video.title #}<br>
+ {# video.open_source_mime_type #}<br>
+ {# video.closed_source_mime_type #}<br>
+ {# video.category #}<br>
+ {# video.media_id #}<br>
+ {# video.open_source_url #}<br>
+ {# video.closed_source_url #}<br>
+ {# video.poster_url #}<br>
+ {% endcomment %}
+
+ <video width="905" height="520" controls>
+ <source src="{{ video.closed_source_url }}" type="{{ video.closed_source_mime_type }}">
+ <source src="{{ video.open_source_url }}" type="{{ video.open_source_mime_type }}">
+ Your browser does not support the video tag.
+ </video>
+{% endfor %}