From 9acc25a393b9bd0fa8284f8694c095618c78d631 Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Mon, 7 Feb 2011 18:41:29 +0100 Subject: Instead of overloading the normal 'render' function, add a 'render_utf8' method --- controller.py | 5 +---- templates/pages/add.mako | 2 +- templates/pages/constadd.mako | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/controller.py b/controller.py index 9f46e0a..95dba66 100644 --- a/controller.py +++ b/controller.py @@ -15,12 +15,9 @@ from sqlalchemy import sql class Form (form.Form): """Make sure we return utf-8 stuff.""" - def render (self, *args): + def render_utf8 (self, *args): return form.Form.render(self, *args).decode("utf-8") - def rendernote (self, *args): - return form.Form.rendernote(self, *args).decode("utf-8") - class Show: def GET(self, year = '', month = ''): if year: diff --git a/templates/pages/add.mako b/templates/pages/add.mako index 737d485..daf26f1 100644 --- a/templates/pages/add.mako +++ b/templates/pages/add.mako @@ -5,7 +5,7 @@ % endif
- ${form.render()} + ${form.render_utf8()}
diff --git a/templates/pages/constadd.mako b/templates/pages/constadd.mako index 3947e51..3eb78bc 100644 --- a/templates/pages/constadd.mako +++ b/templates/pages/constadd.mako @@ -5,7 +5,7 @@ % endif
- ${form.render()} + ${form.render_utf8()}
-- cgit v1.2.3-54-g00ecf