The field converters (:int, :text, etc.)
Hi guys, 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.. Thank you for your time. -Morten
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
The last time I had to mess around with it, IE didn't pass along any empty form fields at all. Is this still the case? ----- Original Message ----- From: "Brad Clements" <bkc@murkworks.com> To: "Morten W. Petersen" <morten@esol.no> Cc: <zope-dev@zope.org> Sent: Monday, February 05, 2001 8:58 AM Subject: Re: [Zope-dev] The field converters (:int, :text, etc.)
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 )
On 5 Feb 2001, at 9:38, Chris McDonough wrote:
The last time I had to mess around with it, IE didn't pass along any empty form fields at all. Is this still the case?
Still? I've never seen the behaviour you describe. My client uses IE exclusively. What version of IE did you test? Brad Clements, bkc@murkworks.com (315)268-1000 http://www.murkworks.com (315)268-9812 Fax netmeeting: ils://ils.murkworks.com AOL-IM: BKClements
I don't know, this was about a year ago... maybe I'm misremembering. ----- Original Message ----- From: "Brad Clements" <bkc@murkworks.com> To: <zope-dev@zope.org> Cc: <chrism@digicool.com> Sent: Monday, February 05, 2001 9:37 AM Subject: Re: [Zope-dev] The field converters (:int, :text, etc.)
On 5 Feb 2001, at 9:38, Chris McDonough wrote:
The last time I had to mess around with it, IE didn't pass along any empty form fields at all. Is this still the case?
Still?
I've never seen the behaviour you describe. My client uses IE exclusively.
What version of IE did you test?
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 )
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 )
participants (4)
-
Brad Clements -
Chris McDonough -
ender -
Morten W. Petersen