Author: test
Date: 2005-12-02 22:01:32 +0000 (Fri, 02 Dec 2005)
New Revision: 1333
Modified:
FormEncode/trunk/formencode/htmlform.py
Log:
Added text_as_default option to htmlform
Modified: FormEncode/trunk/formencode/htmlform.py
===================================================================
--- FormEncode/trunk/formencode/htmlform.py 2005-12-01 17:20:06 UTC (rev
1332)
+++ FormEncode/trunk/formencode/htmlform.py 2005-12-02 22:01:32 UTC (rev
1333)
@@ -38,7 +38,8 @@
warnings.warn(
'HTMLForm has been deprecated; use the htmlfill and '
'htmlfill_schemabuilder modules directly.',
- DeprecationWarning)
+ DeprecationWarning,
+ stacklevel=1)
self.form = form
self._schema = schema
self.auto_insert_errors = auto_insert_errors
@@ -64,7 +65,8 @@
p.close()
return listener.schema()
- def render(self, defaults={}, errors={}, use_all_keys=False):
+ def render(self, defaults={}, errors={}, use_all_keys=False,
+ text_as_default=False):
if self.auto_insert_errors:
auto_error_formatter = htmlfill.default_formatter
else:
@@ -72,7 +74,8 @@
p = htmlfill.FillingParser(
defaults=defaults, errors=errors,
use_all_keys=use_all_keys,
- auto_error_formatter=auto_error_formatter)
+ auto_error_formatter=auto_error_formatter,
+ text_as_default=text_as_default)
p.feed(self.form)
p.close()
return p.text()
-------------------------------------------------------
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