[Zope3-Users] Re: formlib vs. cancel button

2007-02-15 Thread Martin Aspeli
Dennis Schulz wrote: I dont know if it is the proper way, but when I return an empty string there is no validation error. This was also one of the strangest things I found out with formlib. I found that returning {} also works. But this is clearly a design weakness if there is no other

Re: [Zope3-Users] Re: formlib vs. cancel button

2007-02-15 Thread Marius Gedminas
On Thu, Feb 15, 2007 at 09:55:19AM +, Martin Aspeli wrote: Dennis Schulz wrote: I dont know if it is the proper way, but when I return an empty string there is no validation error. This was also one of the strangest things I found out with formlib. I found that returning {} also

Re: [Zope3-Users] Error when calling addform

2007-02-15 Thread Marius Gedminas
On Tue, Feb 13, 2007 at 07:15:11PM +0100, David Johnson wrote: I thought zope.formlib was more complex. That may be true, under the hood, but it is certainly simpler to use. I never fully understood how to use (and extend) forms generated by ZCML addform/editform directives. As I understand

[Zope3-Users] Re: formlib vs. cancel button

2007-02-15 Thread Martin Aspeli
Marius Gedminas wrote: On Thu, Feb 15, 2007 at 09:55:19AM +, Martin Aspeli wrote: Dennis Schulz wrote: I dont know if it is the proper way, but when I return an empty string there is no validation error. This was also one of the strangest things I found out with formlib. I found that

[Zope3-Users] Re: formlib vs. cancel button

2007-02-15 Thread Philipp von Weitershausen
Martin Aspeli wrote: Marius Gedminas wrote: On Thu, Feb 15, 2007 at 09:55:19AM +, Martin Aspeli wrote: Dennis Schulz wrote: I dont know if it is the proper way, but when I return an empty string there is no validation error. This was also one of the strangest things I found out with

[Zope3-Users] Re: formlib vs. cancel button

2007-02-15 Thread Martin Aspeli
Philipp von Weitershausen wrote: Martin Aspeli wrote: Marius Gedminas wrote: On Thu, Feb 15, 2007 at 09:55:19AM +, Martin Aspeli wrote: Dennis Schulz wrote: I dont know if it is the proper way, but when I return an empty string there is no validation error. This was also one of the

[Zope3-Users] Zope 3 mkzopeinstance OverflowWarning Error Condition

2007-02-15 Thread Bernie Pursley
I have used zope2 for a couple of years and I have experimented from time to time with zope3. Today, I configured zope3 with python2.5 and my user account was owner of both the python2.5 directory and the zope3 directory. When attempting to create a zope instance I received the attached

Re: [Zope3-Users] Zope 3 mkzopeinstance OverflowWarning Error Condition

2007-02-15 Thread Marius Gedminas
On Thu, Feb 15, 2007 at 02:44:51PM -0500, Bernie Pursley wrote: I have used zope2 for a couple of years and I have experimented from time to time with zope3. Today, I configured zope3 with python2.5 Zope 3 does not work with Python 2.5 yet. This OverflowWarning error is just the tip of the

Re: [Zope3-Users] Re: formlib vs. cancel button

2007-02-15 Thread Marius Gedminas
On Thu, Feb 15, 2007 at 05:37:52PM +0100, Philipp von Weitershausen wrote: Martin Aspeli wrote: Marius Gedminas wrote: On Thu, Feb 15, 2007 at 09:55:19AM +, Martin Aspeli wrote: Dennis Schulz wrote: I dont know if it is the proper way, but when I return an empty string there is no

[Zope3-Users] Re: formlib vs. cancel button

2007-02-15 Thread Martin Aspeli
Marius Gedminas wrote: I'd be happy to implement and commit something Yay! but I'd be happier if someone else designed the API. When I try to design APIs myself, I tend to change my mind too often. Now I want @form.action(Cancel, validator=None) to mean do no validation. But

[Zope3-Users] Timezones and zope.i18n.locale

2007-02-15 Thread Jamu Kakar
Hi, I'm looking at integrating zope.i18n.locale into my application (so far strings are hard-coded in English). Among the first localization tasks I'm taking on is presenting data in the timezone of the current user. I've been perusing the code in zope.i18n.locale and I see some mention of

Re: [Zope3-Users] Re: formlib vs. cancel button

2007-02-15 Thread Maciej Wisniowski
@form.action(Cancel, validator=None) -1 from me Currently above code is same as: @form.action(Cancel) So I think this is a very common pattern that means: do standard validation, do not use additional action validator. In general there are two validators. Action validator (one we are

[Zope3-Users] Re: formlib vs. cancel button

2007-02-15 Thread Martin Aspeli
Maciej Wisniowski wrote: @form.action(Cancel, validator=None) -1 from me Currently above code is same as: @form.action(Cancel) So I think this is a very common pattern that means: do standard validation, do not use additional action validator. Yes. I think you misunderstand my

[Zope3-Users] Change site-wide error logging behaviour

2007-02-15 Thread Andrew Groom
Hi All, I need to change the default error logging behaviour to send me an email when there's an error. I'm guessing this involves adapting an interface in etc/overrides.zcml or something like that - has anyone done this before and, if so, is willing to share some code ? :-) Much appreciated.

Re: [Zope3-Users] Re: formlib vs. cancel button

2007-02-15 Thread Maciej Wisniowski
Yes. I think you misunderstand my suggestion. I knew someone will write this :) I didn't think about default validator value before sending my previous email. I found this pattern after later... at bed :) so I agree that this might be a good solution that has enough backward compatibility and

Re: [Zope3-Users] Timezones and zope.i18n.locale

2007-02-15 Thread FB
Hi, On Thu, Feb 15, 2007 at 02:46:44PM -0800, Jamu Kakar wrote: Hi, I'm looking at integrating zope.i18n.locale into my application (so far strings are hard-coded in English). Among the first localization tasks I'm taking on is presenting data in the timezone of the current user. I've