my alpha quality dtml-contract tag does allows custom field converters much as has been requested here, its meant as a generic form processing engine with the ability to define per variable error pages. its got some other features. its modeled on the arsdigita (acs) ad_page_contract. due to my stupidity you have to add a custom filter directly to the filter dictionary defined in Filters.py. fyi for the license impaired its gpl'd available at www.zope.org/Members/k_vertigo/PageContract.tgz kapil
On 4 Feb 2001, at 15:59, Morten W. Petersen wrote:
IIRC, there was some talk about modularizing the field converters (checkers) so that they could be easiliy modified and added to. Is there currently any efforts to solving this problem? If not, there's definently a need for it, IMO..
I agree. Each time I get a Zope update I have to edit Converters.py
What I want is something like :empty_as_none
So a float, int or date field will be passed as None if the fields are
blank,
rather than having the converter raising an exception.
ignore_empty doesn't work, because then the field isn't passed in the Record at all.
I use SQLDict as the backend for all my forms (wow, it's great), so None really is needed for every field if its blank. If I have ignore_empty,
then that
field doesn't get updated in the database, so if someone wants to blank out a field, they can't do it.
Brad Clements, bkc@murkworks.com (315)268-1000 http://www.murkworks.com (315)268-9812 Fax netmeeting: ils://ils.murkworks.com AOL-IM: BKClements
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )