Simple debugging patch

0 views
Skip to first unread message

Alexey Nezhdanov

unread,
May 23, 2009, 6:29:52 AM5/23/09
to web...@googlegroups.com
I found this change to be very helpful, when doing multi-table inserts on
single submit:

--- sql.py.old 2009-05-23 14:28:15.286720712 +0400
+++ sql.py 2009-05-23 14:27:09.450720875 +0400
@@ -1372,7 +1372,7 @@
fs.append(fieldname)
vs.append(sql_represent(field.default, ft, fd))
elif field.required is True:
- raise SyntaxError, 'SQLTable: missing required field'
+ raise SyntaxError, 'SQLTable: missing required
field: %s'%field
sql_f = ', '.join(fs)
sql_v = ', '.join(vs)
sql_t = self._tablename


--
Sincerely yours
Alexey Nezhdanov

Alexey Nezhdanov

unread,
May 23, 2009, 6:52:12 AM5/23/09
to web...@googlegroups.com
And another similar one.
Massimo, if there are no security implications then may be it worths going
over all 'raise' statements and checking if there is more info that could be
provided w/o much effort, how do you think?

--- sqlhtml.old2.py 2009-05-19 09:51:00.000000000 +0400
+++ sqlhtml.py 2009-05-23 14:49:49.158721892 +0400
@@ -114,7 +114,7 @@
opts = []
options = field.requires.options()
else:
- raise SyntaxError, 'widget cannot determine options'
+ raise SyntaxError, 'widget cannot determine options of %s'%field
opts += [OPTION(v, _value=k) for (k, v) in options]
return SELECT(*opts, **dict(_id=id, _class=field.type,
_name=field.name, value=value,

Reply all
Reply to author
Forward
0 new messages