--- /dev/null
+# -*- coding: utf-8 -*-
+# Generated by Django 1.9.2 on 2016-04-07 12:32
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('festival', '0012_auto_20160405_2351'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='audio',
+ name='poster',
+ field=models.URLField(blank=True, max_length=1024, verbose_name='poster'),
+ ),
+ migrations.AddField(
+ model_name='video',
+ name='poster',
+ field=models.URLField(blank=True, max_length=1024, verbose_name='poster'),
+ ),
+ ]
--- /dev/null
+# -*- coding: utf-8 -*-
+# Generated by Django 1.9.2 on 2016-04-07 12:33
+from __future__ import unicode_literals
+
+from django.db import migrations
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('festival', '0013_auto_20160407_1432'),
+ ]
+
+ operations = [
+ migrations.RenameField(
+ model_name='audio',
+ old_name='poster',
+ new_name='poster_url',
+ ),
+ migrations.RenameField(
+ model_name='video',
+ old_name='poster',
+ new_name='poster_url',
+ ),
+ ]
open_source_url = models.URLField(_('open source URL'), max_length=1024, blank=True)
closed_source_url = models.URLField(_('closed source URL'), max_length=1024, blank=True)
featured = models.BooleanField(_('featured'), default=False)
+ poster_url = models.URLField(_('poster'), max_length=1024, blank=True)
class Meta(MetaCore):
abstract = True
self.open_source_url = source.attrib['src']
elif self.closed_source_mime_type in source.attrib['type']:
self.closed_source_url = source.attrib['src']
+ video = self.q('video')
+ self.poster_url = video[0].attrib['poster']
class Audio(Media):
+{% load i18n %}
+
<div class="video__card">
<div class="video__card__thumbnail">
- <img src="http://source.unsplash.com/9Vx-QeC0-9Q/400x400" alt="">
+ <img src="{{ video.poster_url }}" alt="">
</div>
<div class="video__card__info">
<h3 class="video__card__name">{{ video.title }}</h3>
</div>
- <a href="{% url 'festival-video-detail' video.slug %}" class="video__card__link">Lire la video</a>
+ <a href="{% url 'festival-video-detail' video.slug %}" class="video__card__link">{% trans "Play the video" %}</a>
</div>
</div>
<div class="embed-responsive">
- <video width="100%" controls data-title="{{ video.title }}" preload="none">
+ <video width="100%" poster="{{ video.poster_url }}" controls data-title="{{ video.title }}" preload="none">
<source src="{{ video.open_source_url }}" type="{{ video.open_source_mime_type }}" />
<source src="{{ video.closed_source_url }}" type="{{ video.closed_source_mime_type }}" />
</video>
--- /dev/null
+<div class="artist__item msry__item">
+ <div class="artist__item__inner">
+ <a href="{% url 'festival-artist-detail' artist.slug %}" class="artist__item__inner">
+ <figure class="artist__item__img">
+ <img src="{% if artist.photo_featured %}{{ MEDIA_URL }}/{{ artist.photo_featured }}{% elif artist.photo %}{{ MEDIA_URL }}/{{ artist.photo }}{% else %}{% endif %}" alt="Portrait {{ artist.name }}">
+ </figure>
+ <h3 class="artist__item__name">
+ <span>
+ {{ artist.name }}
+ </span>
+ </h3>
+ </a>
+ </div>
+</div>
{% featured_video as video %}
{% include 'festival/inc/video_card.html' %}
+{% }
+{% featured_playlist as playlist %}
+{% include 'festival/audio_playlist.html' %}
+
+
{% featured_playlist as playlist %}
{% include 'festival/audio_playlist.html' %}