示例#1
0
    def render(self, commit=False):
        self.body_html = markup(self.body, obj=self)

        # Remove tags which was generated with the markup processor
        text = strip_tags(self.body_html)
        # Unescape entities which was generated with the markup processor
        self.body_text = unescape(text)

        if commit:
            update_fields(self, fields=('body_html', 'body_text', ))
示例#2
0
    def save(self, *args, **kwargs):
        self.signature = markup(self.signature, obj=self)

        super(Profile, self).save(*args, **kwargs)
示例#3
0
    def save(self, *args, **kwargs):
        self.signature = markup(self.signature, obj=self)

        super(Profile, self).save(*args, **kwargs)