Beispiel #1
0
def post_preview(request):
    '''Preview for markitup'''
    markup = request.user.forum_profile.markup
    data = request.POST.get('data', '')

    data = convert_text_to_html(data, markup)
    data = smiles(data)
    return {'data': data}
Beispiel #2
0
 def save(self, *args, **kwargs):
     self.body_html = convert_text_to_html(self.body) 
     if forum_settings.SMILES_SUPPORT:
         self.body_html = smiles(self.body_html)
     super(Post, self).save(*args, **kwargs)