[Zope3-Users] z3c.formjs in a viewlet
I am trying to put a z3c.formjs form into a viewlet. I run into a problem with the generation of the JSSubscriptions code in the resulting page. By default the formjs code puts the IHaveJSSubscriptions marker interface and the jsSubscriptions variable on the viewlet rather than the view. There is little difficulty in copying these to the view in the update() method. However, the set viewlets seem to be selected before my form viewlet begins to operate. Thus the viewlet selection code doesn't see the IHaveJSSubscriptions marker interfaces. (Am I making sense so far). My question is - how should I work around this problem? - I can mark the view in advance - I can render the subscriptions in the viewlet and thus have javascript in the body of the html result - I can give up and put the form in an IFrame Any suggestions? Thanks Kevin ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: Zope eggification - impressions
- Philipp von Weitershausen [EMAIL PROTECTED] wrote: Hermann Himmelbauer wrote: At first, thanks to the newest Zope-3.4.0c1 release. I just installed it from the tarball and it seems to work. However, I'm still somehow technically overwhelmed by installing Zope3 the egg-style way - maybe it's not that hard, but I can't really find a good entry point to that topic. http://pypi.python.org/pypi/zopeproject Are you planning to move the source code from Sandbox to main directory in subversion ? Regards, Baiju M ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] z3c.form - howto ignore the context for single widgets in an Edit form?
Hermann Himmelbauer a écrit : Hi, I'm creating a simple user-administration, Hi, I'm currently doing exactly the same thing :) (user management with z3c.form, and the class for my users derives from zope.app.authentication.principalfolder.InternalPrincipal ) which requires the user to type in the password and a password confirmation. For that, I have an interface which contains the attributes password and password_confirm. Of course, only the password is stored as an object attribute. When I now use form.EditForm for editing this object, z3c.form raises an error as it cannot find the required attribute in the context for the password_confirm widget. I'm not sure this is a good idea to have password_confirm in the interface, because it would mean that your user has two passwords (from an interface point-of-view). The password confirmation should just be part of the form validation. Maybe you have to manually add a field in the form (I'm just going to try that). If you really want to have both password in the interface, you have to implement both attribute, and the password_confirm can just be a property whose 'get' retrieves the password and whose 'set' just checks that the value (that should actually be a hash) is the same as the 'password'. Christophe What's the suggested way to circumvent this problem? Best Regards, Hermann ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Re: Zope eggification - impressions
Hermann Himmelbauer wrote: At first, thanks to the newest Zope-3.4.0c1 release. I just installed it from the tarball and it seems to work. However, I'm still somehow technically overwhelmed by installing Zope3 the egg-style way - maybe it's not that hard, but I can't really find a good entry point to that topic. http://pypi.python.org/pypi/zopeproject It would probably also be a good thing to outline this at the zope.org website (btw., the releases listed there are quite old). We're working on overhauling zope.org. Zope 3, eggs, Grok etc. will play a central role on the new website. For a beginner like me, I'm confronted with a lot of technical (and complicated) things, where I don't know what I need or what to choose (buildout, zopeproject, Egg, PyPi, SVN, grok, setuptools etc.), so something like a Howto install Zope3 the Egg-style way would be very, very handy. Agreed. See the link to zopeproject above. I've announced this multiple times on the lists and blogged about it... there's only so much I can do... ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] z3c.form - howto ignore the context for single widgets in an Edit form?
Maybe the best way to have a password validation would be to let the PasswordWidget display two password fields and check itself the values are the same? Christophe Combelles a écrit : Hermann Himmelbauer a écrit : Hi, I'm creating a simple user-administration, Hi, I'm currently doing exactly the same thing :) (user management with z3c.form, and the class for my users derives from zope.app.authentication.principalfolder.InternalPrincipal ) which requires the user to type in the password and a password confirmation. For that, I have an interface which contains the attributes password and password_confirm. Of course, only the password is stored as an object attribute. When I now use form.EditForm for editing this object, z3c.form raises an error as it cannot find the required attribute in the context for the password_confirm widget. I'm not sure this is a good idea to have password_confirm in the interface, because it would mean that your user has two passwords (from an interface point-of-view). The password confirmation should just be part of the form validation. Maybe you have to manually add a field in the form (I'm just going to try that). If you really want to have both password in the interface, you have to implement both attribute, and the password_confirm can just be a property whose 'get' retrieves the password and whose 'set' just checks that the value (that should actually be a hash) is the same as the 'password'. Christophe What's the suggested way to circumvent this problem? Best Regards, Hermann ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] z3c.form - howto ignore the context for single widgets in an Edit form?
Hi, I'm creating a simple user-administration, which requires the user to type in the password and a password confirmation. For that, I have an interface which contains the attributes password and password_confirm. Of course, only the password is stored as an object attribute. When I now use form.EditForm for editing this object, z3c.form raises an error as it cannot find the required attribute in the context for the password_confirm widget. What's the suggested way to circumvent this problem? Best Regards, Hermann -- [EMAIL PROTECTED] GPG key ID: 299893C7 (on keyservers) FP: 0124 2584 8809 EF2A DBF9 4902 64B4 D16B 2998 93C7 ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] z3c.form - howto ignore the context for single widgets in an Edit form?
On Feb 7, 2008 4:12 PM, Christophe Combelles [EMAIL PROTECTED] wrote: Maybe the best way to have a password validation would be to let the PasswordWidget display two password fields and check itself the values are the same? Maybe PasswordCheckWidget derived from PasswordWidget with this validation. I'll do the same thing, customized user profile with z3c.form or zope.formlib. Anyone test if z3c.form work with Zope2.9 and Five1.4? Christophe Combelles a écrit : Hermann Himmelbauer a écrit : Hi, I'm creating a simple user-administration, Hi, I'm currently doing exactly the same thing :) (user management with z3c.form, and the class for my users derives from zope.app.authentication.principalfolder.InternalPrincipal ) which requires the user to type in the password and a password confirmation. For that, I have an interface which contains the attributes password and password_confirm. Of course, only the password is stored as an object attribute. When I now use form.EditForm for editing this object, z3c.form raises an error as it cannot find the required attribute in the context for the password_confirm widget. I'm not sure this is a good idea to have password_confirm in the interface, because it would mean that your user has two passwords (from an interface point-of-view). The password confirmation should just be part of the form validation. Maybe you have to manually add a field in the form (I'm just going to try that). If you really want to have both password in the interface, you have to implement both attribute, and the password_confirm can just be a property whose 'get' retrieves the password and whose 'set' just checks that the value (that should actually be a hash) is the same as the 'password'. Christophe What's the suggested way to circumvent this problem? Best Regards, Hermann ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users -- Rudá Porto Filgueiras Weimar Consultoria http://python-blog.blogspot.com Hospedagem Plone, Zope e Python? http://www.pytown.com ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] z3c.form - howto ignore the context for single widgets in an Edit form?
On Thursday 07 February 2008, Christophe Combelles wrote: Maybe the best way to have a password validation would be to let the PasswordWidget display two password fields and check itself the values are the same? Bingo. :-) I Would implement a PasswordConfirmationWidget. Then you have a special converter that throws an error, if the passwords do not match. Regards, Stephan -- Stephan Richter Web Software Design, Development and Training Google me. Zope Stephan Richter ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] z3c.form - howto ignore the context for single widgets in an Edit form?
Stephan Richter a écrit : On Thursday 07 February 2008, Christophe Combelles wrote: Maybe the best way to have a password validation would be to let the PasswordWidget display two password fields and check itself the values are the same? Bingo. :-) I Would implement a PasswordConfirmationWidget. Then you have a special converter that throws an error, if the passwords do not match. I have written a very basic confirmation with only javascript, that does not enforce password equality but just warns the user, and that should be sufficient in most case. This is a template that just has to be registered for PasswordWidget, without implementing a new widget: http://kelpi.com/script/10992d z3c:widgetTemplate template=password_input.pt mode=input layer=myapp.interfaces.IMyLayer widget=z3c.form.browser.password.PasswordWidget / If a PasswordConfirmationWidget was implemented, the javascript code should probably be moved into the widget view class. Christophe Regards, Stephan ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: Zope eggification - impressions
Am Donnerstag, 7. Februar 2008 17:36 schrieb Philipp von Weitershausen: Hermann Himmelbauer wrote: At first, thanks to the newest Zope-3.4.0c1 release. I just installed it from the tarball and it seems to work. However, I'm still somehow technically overwhelmed by installing Zope3 the egg-style way - maybe it's not that hard, but I can't really find a good entry point to that topic. http://pypi.python.org/pypi/zopeproject To be honest, I know that already but did not have a deep look at it as zopeproject seems to be a setup for one application, while I currently use one Zope server for multiple applications, therefore I still stick to the tarball. What I wanted to point out is not that there is no documentation for specific technology but that there is no meta-documentation that points out what exists and what I should use - especially not on the zope.org website. But I appreciate a lot that the zope.org website will be overhauled, giving Zope3 more focus, maybe this will solve the problem. Btw., I very nice addition would be to point out applications people created with Zope3. The only ones I am aware of is schooltool and (I think) lovelybooks, so for newcomers it's always great to see what can be done with the technology. Best Regards, Hermann -- [EMAIL PROTECTED] GPG key ID: 299893C7 (on keyservers) FP: 0124 2584 8809 EF2A DBF9 4902 64B4 D16B 2998 93C7 ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] z3c.form - howto ignore the context for single widgets in an Edit form?
Am Freitag, 8. Februar 2008 01:33 schrieb Christophe Combelles: Stephan Richter a écrit : On Thursday 07 February 2008, Christophe Combelles wrote: Maybe the best way to have a password validation would be to let the PasswordWidget display two password fields and check itself the values are the same? Bingo. :-) I Would implement a PasswordConfirmationWidget. Then you have a special converter that throws an error, if the passwords do not match. I have written a very basic confirmation with only javascript, that does not enforce password equality but just warns the user, and that should be sufficient in most case. This is a template that just has to be registered for PasswordWidget, without implementing a new widget: http://kelpi.com/script/10992d z3c:widgetTemplate template=password_input.pt mode=input layer=myapp.interfaces.IMyLayer widget=z3c.form.browser.password.PasswordWidget / If a PasswordConfirmationWidget was implemented, the javascript code should probably be moved into the widget view class. If I understand it right, your solution would alter all password widgets in your application, right? Hmmm, I have also a case when there should be only a single password field, e.g. for the login-page or for changing the password (old password, new password, confirmation of new password). Best Regards, Hermann -- [EMAIL PROTECTED] GPG key ID: 299893C7 (on keyservers) FP: 0124 2584 8809 EF2A DBF9 4902 64B4 D16B 2998 93C7 ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] z3c.form - howto ignore the context for single widgets in an Edit form?
Am Freitag, 8. Februar 2008 00:48 schrieb Stephan Richter: On Thursday 07 February 2008, Christophe Combelles wrote: Maybe the best way to have a password validation would be to let the PasswordWidget display two password fields and check itself the values are the same? Bingo. :-) I Would implement a PasswordConfirmationWidget. Then you have a special converter that throws an error, if the passwords do not match. Right, that seems to be a perfect solution. Btw., it seems that there are quite some generic widget/field-patterns that a lot of people are needing - such as the PasswordConfirmationWidget. Or, in my case I need a special Email field, that inherits from TextLine and may also have some specific widget. So I'd suggest to open some repository, e.g. z3c.formwidgets where people can contribute their fields/widgets so that they can be reused by others. Moreover, this would also be a good entry point for people developing new widgets. Best Regards, Hermann -- [EMAIL PROTECTED] GPG key ID: 299893C7 (on keyservers) FP: 0124 2584 8809 EF2A DBF9 4902 64B4 D16B 2998 93C7 ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users