[Zope3-Users] Re: formlib validators
Hi David, Has anyone used formlib validators? What is the proper technique? I do not seem to be having any success. i use formlib validator in the following way: class ChangePassword(form.PageForm): def validate_change_passwd(self, action, data): errors = self.validate(action, data) # test password if not errors: if data['password'] != data['confirmPassword']: errors = (_(uPassword and confirmation didn't match),) return errors @form.action(uChange, validator=validate_change_passwd) def handle_change_passwd(self, action, data): #... Stefan Martin ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Problem with Umlauts
Hello, I have an schema like that: class IAbbreviation(Interface): abbreviation = TextLine( title = uAbkürzung, required = True) meaning = TextLine( title = uBedeutung, required = True) description = TextLine( title = uErklärung, required = False) but in all Forms (ZMI or formlib generated) the German Umlauts are displayed like Abkürzung which should be Abkürzung. Anyone got an idea what's wrong? Thanks, Florian ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Problem with Umlauts
--On 8. Mai 2006 21:36:26 +0200 Florian Lindner [EMAIL PROTECTED] wrote: Hello, I have an schema like that: class IAbbreviation(Interface): abbreviation = TextLine( title = uAbkürzung, required = True) meaning = TextLine( title = uBedeutung, required = True) description = TextLine( title = uErklärung, required = False) but in all Forms (ZMI or formlib generated) the German Umlauts are displayed like Abkürzung which should be Abkürzung. Likely you need to send a content-type: text/html; charset=utf-8 header -aj -- ZOPYX Ltd. Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany Web: www.zopyx.com - Email: [EMAIL PROTECTED] - Phone +49 - 7071 - 793376 E-Publishing, Python, Zope Plone development, Consulting pgpwW1WlAeDHI.pgp Description: PGP signature ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] More fun with WSGI/zope.paste
On May 7, 2006, at 4:47 PM, Jim Washington wrote: Following along from Gary's idea that zc.resourcelibrary could be done as WSGI middeware, I am now previewing headincludes, a wsgi middleware filter with an alternative implementation of zc.resourcelibrary. It usurps a lot of zc.resourcelibrary configuration for compatibility, so they cannot be used at the same time. But reconfiguring is just a matter of a few files. For more information go to http://zif.hill-street.net/headincludes . The readme is at http://zif.hill-street.net/headincludes/README.txt . development status: works for me :-) awesome! What do you think about some or all of the following: - moving development of all three of these to zope.org svn? - putting them in a namespace? - merging zc.resourcelibrary and headincludes? - the possibility that we might want to include things not only in the head later (some old JS code wanted to be at the end, for instance) and so resourcelibrary, or at least something less specific than headincludes, might be a better name? More concretely, I suggest three new projects in zope.org: z3c.resourcelibrary (deprecating zc.resourcelibrary) z3c.gzipper z3c.jsmin You could also choose zc--that could stand for zope community as much as zope corporation--but it might cause confusion. z has also been proposed. :-) The zope namespace means from the Zope project, not specifically for zope (see zope.interface, for instance) so there's ample precedent for general things going in a z* namespace... What do you think? Getting the code in a publicly-accessible repo, ideally svn.zope.org, is my primary desire--everything else is peripheral. (I don't have as much use personally for your JSON-server right now, btw, but maybe that would be good to put in the repo too?) Gary ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Zope3 Searching and Indexing
Hi all, I have been a Zope user for an year now. My main purpose of using Zope was to build a Knowledge Base and implement a index and search interface. Recently I have thought of migrating to Zope3, though Zope3 component architecture is interesting but it is a big shift for non-python users. I am not a seasoned python user and could easily do without it in Zope2 as I heavily used to rely on ZPT. I have been searching through the web to find some help on implementing indexing and searching in Zope3, something like a detailed howto, if someone has compiled such an howto or knows of it, please pass on the link or information to me Thank you-- Sreeram Nudurupati ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Problem with Umlauts
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Florian, do you have the first line # -*- coding: utf8 -*- in your python module? And is the source encoded in UTF-8? Greetings, Egon Florian Lindner schrieb am 08.05.2006 21:36: Hello, I have an schema like that: class IAbbreviation(Interface): abbreviation = TextLine( title = uAbkürzung, required = True) meaning = TextLine( title = uBedeutung, required = True) description = TextLine( title = uErklärung, required = False) but in all Forms (ZMI or formlib generated) the German Umlauts are displayed like Abkürzung which should be Abkürzung. Anyone got an idea what's wrong? Thanks, Florian ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users - -- Egon Frerich, Freudenbergstr. 16, 28213 Bremen E-Mail: [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.2 (MingW32) Comment: GnuPT 2.7.2 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFEX6cWuTzybIiyjvURAn2vAJ45kPCmgDTPzEnz49p51YeTB55WIgCgx1Aq xrzVzyabm46utdgfsvPG1Kg= =9Wl/ -END PGP SIGNATURE- ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] More fun with WSGI/zope.paste
Gary Poster wrote: More concretely, I suggest three new projects in zope.org: z3c.resourcelibrary (deprecating zc.resourcelibrary) z3c.gzipper z3c.jsmin I understand that z3c is the community name space that Stephan intends for people to use, but is seems terribly ugly to me. Could we come up with a better name? Otherwise, if everyone else likes it/doesn't care, I can bite my tongue. :) You could also choose zc--that could stand for zope community as much as zope corporation--but it might cause confusion. Yeah, I think zc should continue to mean Zope Corporation. I would also like it if other major contributors choose their own name space. z has also been proposed. :-) That strikes me as a good replacement for z3c. -- Benji York Senior Software Engineer Zope Corporation ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] More fun with WSGI/zope.paste
Benji York wrote: Gary Poster wrote: z has also been proposed. :-) That strikes me as a good replacement for z3c. What about zf, for Zope Foundation? Shane ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Problem with Umlauts
--On 8. Mai 2006 22:16:24 +0200 Egon Frerich [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Florian, do you have the first line # -*- coding: utf8 -*- in your python module? And is the source encoded in UTF-8? huh? what has the source encoding to do with how unicode strings are encoded on the output side? -aj -- ZOPYX Ltd. Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany Web: www.zopyx.com - Email: [EMAIL PROTECTED] - Phone +49 - 7071 - 793376 E-Publishing, Python, Zope Plone development, Consulting pgpGqUnLrPrqt.pgp Description: PGP signature ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Zope 3.3.0 beta 1 released!
Hello everyone, The Zope 3 development team is proud to announce Zope 3.3.0 beta 1. Zope 3 is the next major Zope release and has been written from scratch based on the latest software design patterns and the experiences of Zope 2. Cleanup of the Zope 3 packages has continued to ensure a flexible and scalable platform. We continued the work on making the transition from Zope 2 to Zope 3 by making Zope 2.10 use even more of the Zope 3 packages. But we're not there yet. **You can't run Zope 2 applications in Zope 3.** Downloads http://zope.org/Products/Zope3 Installation instructions for both Windows and Un*x/Linux are now available in the top level README.txt:http://www.zope.org/Products/Zope3/3.3.0b1/README.txt file of the distribution. The binary installer is recommended for Windows. Zope 3.3 requires Python 2.4.1 to run. You must also have zlib installed on your system. Most Important Changes Since 3.2 - Provided a new component registry API that allows multiple component registries to be combined more flexibly than before. See 'zope.component.interfaces.IComponentRegistry' for more information. - Greatly simplified local-component registration. See 'zope.component.interfaces.IComponentRegistry' for more information. - Moved many packages out of zope.app to make them easier to use outside of Zope. - Change the session credentials plugin to make it configurable in which fields it looks for the credentials. - Added a new API for collating text. You can now adapt a locale to 'zope.i18n.interfaces.ILocales.ICollator'. You can then use that to sort strings, such as menu entries, in a locale-specific fashion. - A new 'zope.annotation.factory' helper function that makes it easier to create annotations. Also added a README in 'zope.annotation' which explains how to use it. - Added a more complete set of widgets for fields that use iterable sources. These widgets now mirror the set provided by vocabulary-based fields. - Added a cleaner and more robust API to testbrowser for setting file-upload data. - Deprecated several ZCML directives: * factory * vocabulary * content (as an alias to the class directive) * modulealias * renderer:renderer - The 'browser:layer' directive and the 'ILayer' interface has been deprecated. Registering layers has become obsolete, layers should be created as interfaces extending 'IBrowserRequest'. - The 'browser:skin' directive has been deprecated. Skins should be created as interfaces extending 'IBrowserRequest' and can be registered using a simple 'utility' directive. - The 'ISkin' interface has been renamed to 'IBrowserSkinType'. For a complete list of changes see the 'CHANGES.txt' file. Resources - Zope 3 Development Web Site:http://dev.zope.org/Zope3 - Zope 3 Dev Mailing List:http://mail.zope.org/mailman/listinfo/zope3-dev - Zope 3 Users Mailing List:http://mail.zope.org/mailman/listinfo/zope3-users - IRC Channel: #zope3-dev at irc.freenode.net Acknowledgments Thanks goes to everyone that contributed. Enjoy! The Zope 3 Development Team ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] More fun with WSGI/zope.paste
Shane Hathaway wrote: Benji York wrote: Gary Poster wrote: z has also been proposed. :-) That strikes me as a good replacement for z3c. What about zf, for Zope Foundation? I was thinking more about code that doesn't belong to the Foundation, but that's a good choice for code that does. -- Benji York Senior Software Engineer Zope Corporation ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] More fun with WSGI/zope.paste
On May 8, 2006, at 4:41 PM, Benji York wrote: Shane Hathaway wrote: Benji York wrote: Gary Poster wrote: z has also been proposed. :-) That strikes me as a good replacement for z3c. What about zf, for Zope Foundation? I was thinking more about code that doesn't belong to the Foundation, but that's a good choice for code that does. Contributor now == Zope Foundation member soon. zf is fine by me too. Gary ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] More fun with WSGI/zope.paste
On 5/8/06, Benji York [EMAIL PROTECTED] wrote: I must have been unclear. zf sounds great to me as a name space for code that's covered by the contributer agreement. z (or something else) as a default name space for non-foundation code that doesn't otherwise have a name space. I'm not sure what you mean by non-foundation code. Isn't the intent to move the entire repository to the foundation? It's all, in that scenario, foundation code. I'd suggest that code that won't be transferred to the foundation doesn't belong in the svn.zope.org repository at all. -Fred -- Fred L. Drake, Jr.fdrake at gmail.com Don't let schooling interfere with your education. -- Mark Twain ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] More fun with WSGI/zope.paste
Fred Drake wrote: On 5/8/06, Benji York [EMAIL PROTECTED] wrote: I must have been unclear. zf sounds great to me as a name space for code that's covered by the contributer agreement. z (or something else) as a default name space for non-foundation code that doesn't otherwise have a name space. I'm not sure what you mean by non-foundation code. Isn't the intent to move the entire repository to the foundation? It's all, in that scenario, foundation code. No, I'm talking about people who have developed something and can't, won't, or just haven't signed a contributer agreement, but want to make the code open source and available. Instead of each and every one coming up with their own name space there could be a default, non-foundation name space for them to use. Jim (Washington)'s code is just such an example. In this specific case I'd prefer he put it in svn.zope.org, and if so should be in the zf name space. If, for some reason, he doesn't then the name space could be z (or some other nice name). I'd suggest that code that won't be transferred to the foundation doesn't belong in the svn.zope.org repository at all. Totally agreed. -- Benji York Senior Software Engineer Zope Corporation ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Problem with Umlauts
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hey Andreas, Andreas Jung schrieb am 08.05.2006 22:28: --On 8. Mai 2006 22:16:24 +0200 Egon Frerich [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Florian, do you have the first line # -*- coding: utf8 -*- in your python module? And is the source encoded in UTF-8? huh? what has the source encoding to do with how unicode strings are encoded on the output side? -aj If you put Umlauts in your module (here: title = uAbkürzung,) and your editor put the Umlaut from the keyboard in the encoding 'cp1252' or whatever into your module but you have said your file is utf-8 encoded what do you think what is the output? Egon - -- Egon Frerich, Freudenbergstr. 16, 28213 Bremen E-Mail: [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.2 (MingW32) Comment: GnuPT 2.7.2 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFEX7MiuTzybIiyjvURAhonAJwIKEivzyV39n9VGSk8aoBSWBV0cwCfXAAp 38yTkcV6tiMbAfoz+ErBtYc= =cW8L -END PGP SIGNATURE- ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Problem with Umlauts
Am Montag, 8. Mai 2006 22:16 schrieb Egon Frerich: Hi Florian, do you have the first line # -*- coding: utf8 -*- in your python module? No. And is the source encoded in UTF-8? Yes. But with the line above added to the file it works now. Never heard of that line... Thanks, Florian ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Zope 3.3.0 beta 1 released!
Hi El lun, 08-05-2006 a las 15:13 -0400, Stephan Richter escribió: Hello everyone, The Zope 3 development team is proud to announce Zope 3.3.0 beta 1. Great :) - The 'browser:layer' directive and the 'ILayer' interface has been deprecated. Registering layers has become obsolete, layers should be created as interfaces extending 'IBrowserRequest'. - The 'browser:skin' directive has been deprecated. Skins should be created as interfaces extending 'IBrowserRequest' and can be registered using a simple 'utility' directive. - The 'ISkin' interface has been renamed to 'IBrowserSkinType'. Is there a small document or howto explaining how to migrate from the old skins/layers to the new system? Best regards Lorenzo Gil ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Zope 3.3.0 beta 1 released!
On Monday 08 May 2006 17:07, Lorenzo Gil Sanchez wrote: Is there a small document or howto explaining how to migrate from the old skins/layers to the new system? I migrated by reading the deprecation messages and following their advice. :-) Unfortunately, we do not have the resources to write migration guides or new feature how-tos. I hope that someone (thinking specifically of Jeff Shell here) will blog on the new features and changes. :-) Regards, Stephan -- Stephan Richter CBU Physics Chemistry (B.S.) / Tufts Physics (Ph.D. student) Web2k - Web Software Design, Development and Training ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] More fun with WSGI/zope.paste
On May 8, 2006, at 5:15 PM, Jim Washington wrote: Oops. Forgot to cc the list. Gary Poster wrote: [...] What do you think about some or all of the following: - moving development of all three of these to zope.org svn? OK. I do not have commit privileges on zope.org svn. But you do, and I do not mind if you put these packages up there. Checking in the code is an assertion of provenance/license: for instance, I wouldn't have known about the Plone code, which is potentially a problem because of GPL vs. ZPL (see below). Wanna get commit privileges? :-) It's the easiest way for you to assert the code's status. - putting them in a namespace? Probably a good idea. If it was only one... well, but I do seem to have gotten prolific. :) :-) Go for it (on whichever namespace gets decided). These three projects, I feel a need to reiterate, need zope.paste and Paste.Deploy (or a similar stack), to use with zope3, so deprecating zc.resourcelibrary may not be a good idea until more folks are on-board with the wsgi filters idea. I think the project is on board with wsgi. paste is maybe not as mainstream in the Zope world yet, so yes, maybe we need to let that settle out. If there are no issues with the paste-based version, though, I'd like zc to use it. gzipper and jsmin really have no particular ties to zope at all, except that I used Zope3 for developing them, and they probably work OK in Zope3 as a consequence. (PS. er, actually, the packer in jsmin came from Plone.) eek! GPL can't go in zope.org. Do you know what the license is to that particular component? You could also choose zc--that could stand for zope community as much as zope corporation--but it might cause confusion. z has also been proposed. :-) The zope namespace means from the Zope project, not specifically for zope (see zope.interface, for instance) so there's ample precedent for general things going in a z* namespace... What do you think? Getting the code in a publicly-accessible repo, ideally svn.zope.org, is my primary desire--everything else is peripheral. I agree. (I don't have as much use personally for your JSON-server right now, btw, but maybe that would be good to put in the repo too?) jsonserver is sitting happily in z3labs, where Balazs Ree and I are working (slowly) on a unified package for zope2 /five and zope3. It's a moving target, and we keep going off on interesting tangents. :) So, to recap, I have largely positive thoughts about your suggestions. And please feel free to put whichever of these packages you feel are appropriate wherever you wish on svn.zope.org. How's that for flexibility? With the caveats above, sounds great. :-) Gary ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] More fun with WSGI/zope.paste
On May 8, 2006, at 5:39 PM, Benji York wrote: Jim Washington wrote: OK. I do not have commit privileges on zope.org svn. But you do, and I do not mind if you put these packages up there. AFAIK, you'd still have to sign a contributor agreement. (PS. er, actually, the packer in jsmin came from Plone.) Is the packer code GPL? Heh. That's pretty much what I said. Benji wants to get me a shirt that says -vvv :-) Gary ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Internationalization, Widgets, and Currency
David Johnson wrote: I am trying to implement a currency input using a Float widget. However, the widget is populated with a strange character, and when saving the data that strange character causes problems. I do not see a Currency widget. What is the proper internationalization technique in regards to currency and widgets? If I just use the float widget without the locale, the numbers are displayed without the trailing zeros that are standard, although it otherwise works fine. For example, US $1.20 is displayed as 1.2. You could try a customised FloatWidget (or TextWidget) to allow you to control the display and input value formats, a e.g. class CurrencyWidget(TextWidget): def _toFieldValue(self, input): try: return float(input) # convert to currency object except ValueError, v: raise ConversionError(_(Invalid currency format ..), v) def _getFormValue(self): currency = super(CurrencyWidget, self)._getFormValue() if currency: return '$0.2f' % currency # display currency ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users