From cd6a0be01d0f09faa55760769a9beee011599240 Mon Sep 17 00:00:00 2001 From: Martin Vilcans Date: Wed, 24 Aug 2011 00:18:14 +0200 Subject: Serve annotated HTML from server so we can debug parsing --- server/main.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'server/main.py') diff --git a/server/main.py b/server/main.py index 6e87e18..f3f5e40 100644 --- a/server/main.py +++ b/server/main.py @@ -8,13 +8,14 @@ from bottle import route, template, request, response, error, debug from google.appengine.ext.webapp.util import run_wsgi_app from screenplain.export.text import to_text +from screenplain.export.annotated_html import to_annotated_html -@route('/text', method='POST') +@route('/convert', method='POST') def DisplayForm(): - response.content_type = 'text/plain; charset=utf-8' + response.content_type = 'text/html; charset=utf-8' input = StringIO(request.forms.get('data')) output = StringIO() - to_text(input, output) + to_annotated_html(input, output) return output.getvalue() def main(): -- cgit v1.2.3