[Zope3-Users] Formlib examples
Hi All, I am having an extraordinary amount of bother coming to grips with the formlib module. Could anyone offer up complex examples with multiple schemas and subforms; and as an extended topic, examples including custom fields and widgets. My own attempts to date have ended up unneccessarily complex and indeed I have found it necessary to fall back to templates and BrowserView, to my shame. Many thanks, Darryl ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Re: ZCML updating question
David Pratt wrote: > Hi. I am trying to update an old package. Can someone suggest an updated > equivalent for the following: > > > > > > ... ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] ZCML updating question
Hi. I am trying to update an old package. Can someone suggest an updated equivalent for the following: Many thanks. Regards, David ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Re: default defaultView
Florian Lindner wrote: > Am Mittwoch, 9. August 2006 00:27 schrieb Philipp von Weitershausen: >> Florian Lindner wrote: >>> Hello, >>> is there a kind of default defaultView? >>> So when a object is called and no defaultView is defined that a view like >>> index.html is called? I thought yes, but a test has not proven that. >>> >>> If there is really no such default, why? I think a little bit more >>> (optional) convention over configuration would be good for Zope... >> zope.app/browser.zcml says: >> >> >> >> So, as you can see, we indeed have a default default view. It's index.html. > > That's what I thought too. But: > > I go to an object and get an 404 error. Now add this ZCML to configure.zcml: > > name="index.html" > for="CS.Link.interfaces.ILink" > layer="CS.skin.interfaces.ICentershockSkin" > /> > > and the same URL work. You see that there is already a view named index.html > > name="index.html" > for="CS.Link.interfaces.ILink" > template="link.pt" > permission="zope.View" > layer="CS.skin.interfaces.ICentershockSkin" > /> > > But why is it not used as the default view? I bet (but don't know for sure) it has to do with your skin layer. Philipp ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Re: default defaultView
Am Mittwoch, 9. August 2006 00:27 schrieb Philipp von Weitershausen: > Florian Lindner wrote: > > Hello, > > is there a kind of default defaultView? > > So when a object is called and no defaultView is defined that a view like > > index.html is called? I thought yes, but a test has not proven that. > > > > If there is really no such default, why? I think a little bit more > > (optional) convention over configuration would be good for Zope... > > zope.app/browser.zcml says: > > > > So, as you can see, we indeed have a default default view. It's index.html. That's what I thought too. But: I go to an object and get an 404 error. Now add this ZCML to configure.zcml: and the same URL work. You see that there is already a view named index.html But why is it not used as the default view? Thanks, Florian ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Re: Permissions for updateOrder() on OrderedContainer
Hi Phillip, I didn't spend much time in finding out about removeAllProxies. This trick came to me along with a serious warning via email as an answer to my mailing list message. I just used this cheating to find out, if the way I'm going besides that is possible. Now that I know, that it's working, I will read the other answers carefully and will try to understand what's going on there and how I can do it without ignoring this red, blinking lamp :) Thanks for your support, Arne Philipp von Weitershausen schrieb: Arne Nordmann wrote: thank you very much indeed for your answers. I use removeAllPermissions() at the moment to have an ad hoc solution and now will busy myself with your ideas. For the sake of correctness: I ment to write removeAllProxies() removeAllProxies simply disables security checking. Big red warning lights should go on in your head whenever you want to use it. It seems like you invested some time in finding out about removeAllProxies instead of following our advice. Tom Dossis even spelled it out for you. If you choose to ignore this, you're on your own. Don't expect Zope to do much security for you when you ignore its system completely. Philipp ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] zalchemy integration
David Pratt wrote: Hi Carlo. As a workaround to get objects into the db you can comment out the following lines in checkName like this: def checkName(self, name, container): if isinstance(name, str): name = unicode(name) elif not isinstance(name, unicode): raise TypeError("Invalid name type", type(name)) #unproxied = removeSecurityProxy(container) #if not name.startswith(unproxied._class.__name__+'.'): # raise UserError("Invalid name for SQLAlchemy object") return True I actually worked around it as following: unproxied = removeSecurityProxy(container) -> if not ISQLAlchemyContainer.providedBy(unproxied): -> return NameChooser.checkName(self, name, container) if not name.startswith(unproxied._class.__name__ + '.'): raise UserError("Invalid name for SQLAlchemy object") even if the 'else' case seems unused: i.e., this method is not called while adding a SQLAlchemyContainer. Once skipped this, the process halted while adding the 'blank' object to the db: in zope.app.container.browser.adding, in the method add(), the following lines failed: container[name] = content ... one ininfluent-for-this-problem line ... return container[name] Here, the last line failed because the SQLAlchemyContainer completely disregards the "name" attribute (as specified in container.txt), so retrieving data using the same name is not possible. Maybe I could spend some time in it, but this "basic" problem leads me to some doubt about the state of the zalchemy package and its integration with Zope3. In the mailing list archives I found some discussion about ORM problems (2-phase commit, thread support and so on) but nothing specific about zalchemy, and (as far as I can see) no "definite" solution on the sqlalchemy integration. Could someone tell the current state-of-the-art about this, or his/her experience about integrating sqlalchemy in other ways? Thank you in advance. Carlo Cardelli. ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users