diff options
-rw-r--r-- | core/models/troggle.py | 4 | ||||
-rw-r--r-- | templates/expedition.html | 8 |
2 files changed, 11 insertions, 1 deletions
diff --git a/core/models/troggle.py b/core/models/troggle.py index 886bcf5..c99e59b 100644 --- a/core/models/troggle.py +++ b/core/models/troggle.py @@ -125,6 +125,10 @@ class Person(TroggleModel): """Boolean: is this person notable?""" return self.notability() > Decimal(1) / Decimal(3) + def get_mugshot_url(self): + # insert code to extract src= url from the blub text + return f"/person/{self.slug}" + def surveyedleglength(self): return sum([personexpedition.surveyedleglength() for personexpedition in self.personexpedition_set.all()]) diff --git a/templates/expedition.html b/templates/expedition.html index d874053..1623a0c 100644 --- a/templates/expedition.html +++ b/templates/expedition.html @@ -49,7 +49,13 @@ an "<b>S</b>" for a survey trip. The colours of the "<b>T</b>" and "<b>S</b>" a <td><a href="{{ personexpoday.personexpedition.get_absolute_url }}">{{personexpoday.personexpedition.person.fullname|safe}}</a></td> <td>{% if personexpoday.personexpedition.person.mug_shot %} -<div align=right><a href="{{personexpoday.personexpedition.person.mug_shot}}">😃</a></div>{% endif %}</td> +<div align=right><a href="{{personexpoday.personexpedition.person.mug_shot}}">😃</a></div> +{% else %} + {% if personexpoday.personexpedition.person.blurb %} +<a href="{{personexpoday.personexpedition.person.get_mugshot_url}}">😁</a> + {% endif %} +{% endif %} +</td> {% for activities in personexpoday.personrow %} {% if activities.personentries or activities.survexblocks %} |