render media
This commit is contained in:
parent
8a8abd33ff
commit
14679dc0a5
1 changed files with 2 additions and 0 deletions
|
@ -34,6 +34,8 @@ class Event(models.Model):
|
||||||
html = ''
|
html = ''
|
||||||
if self.media and self.media.split('.')[-1] in ('jpg', 'png', 'gif'):
|
if self.media and self.media.split('.')[-1] in ('jpg', 'png', 'gif'):
|
||||||
html += '<img src="%s">' % self.media
|
html += '<img src="%s">' % self.media
|
||||||
|
elif '<' in self.media:
|
||||||
|
html = self.media
|
||||||
else:
|
else:
|
||||||
html += '<iframe src="%s"></iframe>' % self.media
|
html += '<iframe src="%s"></iframe>' % self.media
|
||||||
if self.media_caption:
|
if self.media_caption:
|
||||||
|
|
Loading…
Reference in a new issue