def save(self, *args, **kwargs): if get_config('ENABLE_BBCODE', False): markup = postmarkup.create(annotate_links=False, use_pygments=get_config('BBCODE_USE_PYGMENTS', False)) self.content_html = markup(self.content) else: self.content_html = self.content super(Post, self).save(*args, **kwargs)
def save(self, *args, **kwargs): cache.delete('misc_drawboard') if get_config('ENABLE_BBCODE', False): markup = postmarkup.create(annotate_links=False, use_pygments=get_config('BBCODE_USE_PYGMENTS', False)) self.content_html = markup(self.content) else: self.content_html = self.content super(Drawboard, self).save(*args, **kwargs) cache.set('misc_drawboard', self)
def save(self, *args, **kwargs): if not self.user.is_superuser: is_staff_group = self.group.is_staff_group if self.group else False self.user.is_staff = is_staff_group if get_config('ENABLE_BBCODE', False): markup = postmarkup.create(annotate_links=False, use_pygments=get_config('BBCODE_USE_PYGMENTS', False)) self.signature_html = markup(self.signature) self.about_html = markup(self.about) else: self.signature_html = self.signature self.about_html = markup(self.about) super(UserProfile, self).save(*args, **kwargs)