def preview_page(request): """ simple post/get view, returns the output of markdown parser """ return HttpResponse(markdown_to_html(request.POST.get("content")))
def save(self, *args, **kwargs): self.content_html = markdown_to_html(self.content) return super(Revision, self).save(*args, **kwargs)