render media

This commit is contained in:
j 2021-11-19 15:32:23 +01:00
parent 8a8abd33ff
commit 14679dc0a5

View file

@ -34,6 +34,8 @@ class Event(models.Model):
html = ''
if self.media and self.media.split('.')[-1] in ('jpg', 'png', 'gif'):
html += '<img src="%s">' % self.media
elif '<' in self.media:
html = self.media
else:
html += '<iframe src="%s"></iframe>' % self.media
if self.media_caption: