From cadf0e946a29f56808da12e84b8e1831f14a0f8a Mon Sep 17 00:00:00 2001 From: mdipierro Date: Tue, 9 Jul 2013 16:15:21 -0500 Subject: [PATCH] synced with gluino --- VERSION | 2 +- gluon/sqlhtml.py | 7 +++++-- gluon/template.py | 4 ++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/VERSION b/VERSION index bae1dd83..7d9d629c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.6.0-development+timestamp.2013.07.08.08.46.42 +Version 2.6.0-development+timestamp.2013.07.09.16.14.32 diff --git a/gluon/sqlhtml.py b/gluon/sqlhtml.py index 166b60bb..ade7fad4 100644 --- a/gluon/sqlhtml.py +++ b/gluon/sqlhtml.py @@ -39,9 +39,12 @@ import re import cStringIO from gluon import current, redirect import inspect -import settings -is_gae = settings.global_settings.web2py_runtime_gae +try: + import settings + is_gae = settings.global_settings.web2py_runtime_gae +except ImportError: + is_gae = False diff --git a/gluon/template.py b/gluon/template.py index 4425a202..f5e579cf 100644 --- a/gluon/template.py +++ b/gluon/template.py @@ -800,8 +800,8 @@ class DummyResponse(): def write(self, data, escape=True): if not escape: self.body.write(str(data)) - elif hasattr(data, 'as_html') and callable(data.as_html): - self.body.write(data.as_html()) + elif hasattr(data, 'xml') and callable(data.xml): + self.body.write(data.xml()) else: # make it a string if not isinstance(data, (str, unicode)):