Mercurial > public > sg101
diff forums/models.py @ 955:71a671dab55d
First commit of whitelisting image hosts.
This is behind a feature flag courtesy of waffle.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Wed, 03 Jun 2015 21:13:08 -0500 |
parents | 2e429e2b7bb6 |
children | 5ba2508939f7 |
line wrap: on
line diff
--- a/forums/models.py Tue May 26 20:40:31 2015 -0500 +++ b/forums/models.py Wed Jun 03 21:13:08 2015 -0500 @@ -311,7 +311,9 @@ self.creation_date = datetime.datetime.now() self.update_date = self.creation_date - self.html = site_markup(self.body) + self.html = kwargs.pop('html', None) + if self.html is None: + self.html = site_markup(self.body) super(Post, self).save(*args, **kwargs) def delete(self, *args, **kwargs):