Mercurial > public > sg101
diff gcalendar/models.py @ 1021:68c3343f3318
Perform image_check on gcalendar description.
Also add image hotlink/upload forms to gcalendar add event page.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Tue, 08 Dec 2015 21:39:19 -0600 |
parents | 9165edfb1709 |
children | f0ac48aa8c64 |
line wrap: on
line diff
--- a/gcalendar/models.py Tue Dec 08 17:32:31 2015 -0600 +++ b/gcalendar/models.py Tue Dec 08 21:39:19 2015 -0600 @@ -69,7 +69,9 @@ ordering = ('-date_submitted', ) def save(self, *args, **kwargs): - self.html = site_markup(self.description, relative_urls=False) + self.html = kwargs.pop('html', None) + if not self.html and self.description: + self.html = site_markup(self.description, relative_urls=False) super(Event, self).save(*args, **kwargs) def is_approved(self):