Mercurial > public > sg101
comparison messages/models.py @ 1022:82f1f6f905eb
Perform image_check on private messages.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Wed, 09 Dec 2015 21:16:04 -0600 |
parents | 4a4fa174a0ec |
children | f0ac48aa8c64 |
comparison
equal
deleted
inserted
replaced
1021:68c3343f3318 | 1022:82f1f6f905eb |
---|---|
62 return False | 62 return False |
63 | 63 |
64 def save(self, *args, **kwargs): | 64 def save(self, *args, **kwargs): |
65 if not self.id: | 65 if not self.id: |
66 self.send_date = datetime.datetime.now() | 66 self.send_date = datetime.datetime.now() |
67 self.html = site_markup(self.message) | 67 |
68 self.html = kwargs.pop('html', None) | |
69 if not self.html and self.message: | |
70 self.html = site_markup(self.message) | |
68 super(Message, self).save(*args, **kwargs) | 71 super(Message, self).save(*args, **kwargs) |
69 | 72 |
70 def __unicode__(self): | 73 def __unicode__(self): |
71 return self.subject | 74 return self.subject |
72 | 75 |