From: Guillaume Pellerin Date: Mon, 11 Apr 2016 12:24:42 +0000 (+0200) Subject: add thumb for various images X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=9679b472a6f7f6f25c789f71cbfcb75076eb6fd1;p=mezzo.git add thumb for various images --- diff --git a/app/festival/models.py b/app/festival/models.py index d624d8bd..79c90116 100644 --- a/app/festival/models.py +++ b/app/festival/models.py @@ -115,6 +115,13 @@ class Artist(Displayable, RichText, AdminThumbMixin): self.set_names() super(Artist, self).save(*args, **kwargs) + @property + def featured_image(self): + if self.photo_featured: + return self.photo_featured + else: + return self.photo + class Media(Displayable, RichText): """Media""" diff --git a/app/festival/templates/festival/inc/artist_card.html b/app/festival/templates/festival/inc/artist_card.html index 77741438..f485b7f7 100644 --- a/app/festival/templates/festival/inc/artist_card.html +++ b/app/festival/templates/festival/inc/artist_card.html @@ -1,8 +1,10 @@ +{% load i18n pages_tags mezzanine_tags %} +
- Portrait {{ artist.name }} + Portrait {{ artist.name }}

diff --git a/app/templates/agenda/event_detail.html b/app/templates/agenda/event_detail.html index f60b1d25..71429502 100644 --- a/app/templates/agenda/event_detail.html +++ b/app/templates/agenda/event_detail.html @@ -80,11 +80,11 @@ {% endblock %} diff --git a/app/templates/base.html b/app/templates/base.html index a78a9681..f406c4f5 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -91,7 +91,7 @@
    {% featured_events as events %} {% for event in events %} -
  • +
  • @@ -237,4 +237,3 @@ -