Mercurial > public > sg101
comparison 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 |
comparison
equal
deleted
inserted
replaced
1020:a052798c146c | 1021:68c3343f3318 |
---|---|
67 | 67 |
68 class Meta: | 68 class Meta: |
69 ordering = ('-date_submitted', ) | 69 ordering = ('-date_submitted', ) |
70 | 70 |
71 def save(self, *args, **kwargs): | 71 def save(self, *args, **kwargs): |
72 self.html = site_markup(self.description, relative_urls=False) | 72 self.html = kwargs.pop('html', None) |
73 if not self.html and self.description: | |
74 self.html = site_markup(self.description, relative_urls=False) | |
73 super(Event, self).save(*args, **kwargs) | 75 super(Event, self).save(*args, **kwargs) |
74 | 76 |
75 def is_approved(self): | 77 def is_approved(self): |
76 return self.status not in (self.NEW, self.EDIT_REQ, self.DEL_REQ) | 78 return self.status not in (self.NEW, self.EDIT_REQ, self.DEL_REQ) |
77 is_approved.boolean = True | 79 is_approved.boolean = True |