Author: ianb
Date: 2005-12-19 18:39:06 +0000 (Mon, 19 Dec 2005)
New Revision: 1431
Modified:
FormEncode/trunk/formencode/htmlfill.py
Log:
Add a comment before automatically inserted error messages, to make it easier
to figure out where they came from when something goes wrong
Modified: FormEncode/trunk/formencode/htmlfill.py
===================================================================
--- FormEncode/trunk/formencode/htmlfill.py 2005-12-18 22:53:31 UTC (rev
1430)
+++ FormEncode/trunk/formencode/htmlfill.py 2005-12-19 18:39:06 UTC (rev
1431)
@@ -207,8 +207,10 @@
del unused_errors[key]
if self.auto_error_formatter:
for key, value in unused_errors.items():
+ error_message = self.auto_error_formatter(value)
+ error_message = '<!-- for: %s -->\n%s' % (key, error_message)
self.insert_at_marker(
- key, self.auto_error_formatter(value))
+ key, error_message)
unused_errors = {}
if self.use_all_keys:
unused = self.defaults.copy()
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
FormEncode-CVS mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/formencode-cvs