From d424dfdd9834173645fbabd4c3522a36d571db0a Mon Sep 17 00:00:00 2001 From: Massimo Di Pierro Date: Sun, 25 Dec 2011 14:03:01 -0600 Subject: [PATCH] callable formstyle without wrapper, thanks Iceberg --- VERSION | 2 +- gluon/sqlhtml.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/VERSION b/VERSION index f749cc6b..2fb1c481 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 1.99.4 (2011-12-25 12:33:19) stable +Version 1.99.4 (2011-12-25 14:02:50) stable diff --git a/gluon/sqlhtml.py b/gluon/sqlhtml.py index 19c688ec..2d31e44b 100644 --- a/gluon/sqlhtml.py +++ b/gluon/sqlhtml.py @@ -982,11 +982,11 @@ class SQLFORM(FORM): table.append(LI(DIV(a,_class='w2p_fl'), div_b, DIV(c,_class='w2p_fc'),_id=id)) - elif type(self.formstyle) == type(lambda:None): + elif callable(self.formstyle): table = TABLE() for id,a,b,c in xfields: - td_b = self.field_parent[id] = TD(b,_class='w2p_fw') - newrows = self.formstyle(id,a,td_b,c) + raw_b = self.field_parent[id] = b + newrows = self.formstyle(id,a,raw_b,c) if type(newrows).__name__ != "tuple": newrows = [newrows] for newrow in newrows: