]> git.parisson.com Git - mezzo.git/commitdiff
fix image urls
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Thu, 7 Apr 2016 15:14:13 +0000 (17:14 +0200)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Thu, 7 Apr 2016 15:14:13 +0000 (17:14 +0200)
app/festival/templates/festival/artist_detail.html
app/festival/templates/festival/inc/artist_card.html
app/templates/blog/includes/post_card.html

index 458a2868d5646f145806a0b5f9ca503b0903db3d..cb07f3b995d3619817ead5b4544ddd2c33cf61dd 100644 (file)
@@ -11,7 +11,7 @@
     <p>
     {% if artist.photo %}
     <figure class="artist__figure img__align{% if artist.photo_alignment == 'left' %}--left{% elif artist.photo_alignment == 'right' %}--right{% else %}--center{% endif %}">
-        <img src="{{ MEDIA_URL }}/{% if artist.photo_featured %}{{ artist.photo_featured }}{% else %}{{ artist.photo }}{% endif %}" />
+        <img src="{% if artist.photo_featured %}{{ artist.photo_featured.url }}{% else %}{{ artist.photo.url }}{% endif %}" />
         <figcaption class="artist__figure__copyright">
            {{ artist.photo_credits }}
         </figcaption>
index c867038e5f22c056e7fab248eb224dbb8f5d361d..7774143888d8d3a7f994a2c02e65f3eec55327ef 100644 (file)
@@ -2,7 +2,7 @@
     <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 }}">
+                <img src="{% if artist.photo_featured %}{{ artist.photo_featured.url }}{% elif artist.photo %}/{{ artist.photo.url }}{% else %}{% endif %}" alt="Portrait {{ artist.name }}">
             </figure>
             <h3 class="artist__item__name">
                 <span>
index 1729c7a4f82875e98e887b52e10e42ea4b3cceca..9e86e6906c84299377995fb630926de6aee4d85c 100644 (file)
@@ -2,7 +2,7 @@
     <div class="artist__item__inner">
         <a href="{% url 'blog_post_detail' post.slug %}" class="artist__item__inner">
             <figure class="artist__item__img">
-                <img src="{{ MEDIA_URL }}/{{ post.photo_featured }}" alt="Article: {{ post.title }}">
+                <img src="{{ post.featured_image.url }}" alt="Article: {{ post.title }}">
             </figure>
             <h3 class="artist__item__name">
                 <span>