Re: [Zope3-Users] IContentType: interface implements another interface ?

2005-05-26 Thread Dominik Huber
Sakesun Roykiattisak wrote: So the document does wrong. Let fix it and put my name on the contributer list... :-D Done. Thank you for the pointer. Regards, Dominik ___ Zope3-users mailing list Zope3-users@zope.org

Re: [Zope3-Users] component.adapts or __used_for__

2005-05-30 Thread Dominik Huber
direvtives detect their for- and provides-attributes implicitely. for example: adapter factory=bar.FooForBar / instead of adapter factory=bar.FooForBar provides=.IFoo for=.IBar / Regards, Dominik Huber ___ Zope3-users mailing list Zope3-users@zope.org http

Re: [Zope3-Users] To Subclass, or to Adapt?

2005-08-12 Thread Dominik Huber
Hi James A few other thoughts... James Allwyn wrote: I would appreciate any guidance on what the recommended Zope3-ish way of handling this would be. I feel the options are either to create a generic IProperty object, and subclass it to IHouse, ICateredHall, ISelfCateredHall, IHomeStay, or

Re: [Zope3-Users] To Subclass, or to Adapt?

2005-08-15 Thread Dominik Huber
James Allwyn wrote: Thanks Stephan and Dominik for all the help so far. I've decided to go down the route Stephan suggested, since I was more able to get my head around it. I've got a question about adapters / ZPT: * Is is possible to access the output of an adapter directly from ZPT?

Re: [Zope3-Users] Making site skins

2005-08-17 Thread Dominik Huber
Johan Carlsson wrote: Ok, so far I figured out the following: 1. Resources gets registered as adapters in the Global Site Manager. 2. The adapter is registerd to adapt from the current layer interface (defaults to IDefaultBrowserLayer) to the Interface interface (strange, why is that so I

Re: [Zope3-Users] Making site skins

2005-08-17 Thread Dominik Huber
Johan Carlsson wrote: (zope.app.publication.httpfactory.HTTPPublicationRequestFactory - zope.app.publication.browser.setDefaultSkin) Afterward the specific adapters such as views get invoked, because you register those to a dedicated request interface using the layer attribute. Attention

Re: [Zope3-Users] Disappearing dictionary. Upon restart, dictionary resets.

2005-09-21 Thread Dominik Huber
Alec Munro wrote: I have a content component that has a property that is a dictionary, the keys of which are objects (content components themselves). The values are lists of strings. I've tried implementing this a couple different ways, but each time I restart, the dictionary comes up empty.

Re: [Zope3-Users] Disappearing dictionary. Upon restart, dictionary resets.

2005-09-26 Thread Dominik Huber
Tom Dossis wrote: I have a content component that has a property that is a dictionary, the keys of which are objects (content components themselves). The values are lists of strings. I've tried implementing this a couple different ways, but each time I restart, the dictionary comes up empty.

Re: [Zope3-Users] Disappearing dictionary. Upon restart, dictionary resets.

2005-09-26 Thread Dominik Huber
Alec Munro wrote: I've tried it with PersistentDicts and PersistentMappings, and no luck. It's very odd, I think there must be some fundamental step towards the use of a mapping in Zope that I'm missing. The fundamental step to provide persistency is to derive the target classes from

Re: [Zope3-Users] No module named formlib...

2005-10-26 Thread Dominik Huber
Tom Dossis wrote: Joshua Burvill wrote: Hello All, I am starting to work through Benji Yorks zope3 quickstart document which I am enjoying, but I've run into one problem. http://www.benjiyork.com/quick_start/ It seems the problem is with the line from zope.formlib import form In

Re: [Zope3-Users] View with template

2005-10-30 Thread Dominik Huber
Frank Burkhardt wrote: Hi, a short introduction first: I'm Frank Burkhardt, working at the Max Planck Institute in Germany. My employer wants a new website to replace the old one (www.cbs.mpg.de - yes, it looks really really ugly). We chose Zope3 to implement it. Maybe there will be one or

Re: [Zope3-Users] How to redirect to a view after adding an object

2005-10-31 Thread Dominik Huber
Martin Margo wrote: Hello Sorry if this was asked before. I did some basic search and couldn't find anything. I am new to Zope3 myself. After reading Stephan and Von Weitershausen's book on Zope 3, I begin building my own web application. My question is : After my user adds a new custom

Re: [Zope3-Users] Anyone had any success with ZCatalog in Zope 3?

2005-11-21 Thread Dominik Huber
Johan Carlsson wrote: Right after that I do this: catalog = Catalog() for index_name, index_attribute, idx_if, attr_call, index_type in indexes: idx = index_type(index_attribute, idx_if, attr_call) catalog[index_name] = idx

Re: [Zope3-Users] Permissions of a given object

2005-12-15 Thread Dominik Huber
Frank Burkhardt wrote: Hi, when I search using a catalog, I get a list of persistent objects but maybe there are objects among them, the calling user doesn't have permissions for. How do I check, if the current user (the one calling the view which queries the catalog) is allowed to view an

Re: [Zope3-Users] Convert from string to class

2006-01-18 Thread Dominik Huber
Florian Lindner wrote: Hello, I've a string like zope.app.folder.Folder and I want to get the class zope.app.folder.Folder from this string. How can I do that? It's probably more a python problem that Zope... but I hope you excuse. another implementation ;) zope.dottedname.resolve.resolve

Re: [Zope3-Users] Trouble understanding events, handlers, subscribers (Trying to use component architecture outside of Zope)

2006-01-23 Thread Dominik Huber
Jeff Shell wrote: I'm writing a small command line tool that uses parts of Zope 3's component architecture (zope.component, zope.interface, zope.schema), and just includes those packages and a couple of supporting ones found in dependencies (zope.i18nmessageid, exceptions, texting). No

Re: [Zope3-Users] Forbidden Attribute errors whilst adapting to schema

2006-02-03 Thread Dominik Huber
Rupert Redington wrote: adapter for=.interfaces.ILink provides=.interfaces.ILinkDetails factory=.link.LinkDetails trusted=True / if you use trusted adapters you have to declare an additional class or content directive for the adapter itself.: class

Re: [Zope3-Users] Forbidden Attribute errors whilst adapting to schema

2006-02-03 Thread Dominik Huber
Rupert Redington wrote: Dominik Huber wrote: Rupert Redington wrote: adapter for=.interfaces.ILink provides=.interfaces.ILinkDetails factory=.link.LinkDetails trusted=True / if you use trusted adapters you have to declare an additional class or content

Re: [Zope3-Users] Forbidden Attribute errors whilst adapting to schema

2006-02-03 Thread Dominik Huber
Rupert Redington wrote: I prefer the trusted adapter because they encapslulate the adapter inside a security proxy. Then the trusted adapter has full access to the underlying object. That simplifies the security story very much because you handle it on the adation level. If you use locatable

Re: [Zope3-Users] Re: Checking if an interface is provided by an object or could be adapted to

2006-05-03 Thread Dominik Huber
Bernd Dorn wrote: On 01.05.2006, at 01:55, Stephan Richter wrote: On Sunday 30 April 2006 19:34, Bernd Dorn wrote: component.queryMultiAdapter((bar,baz), IFoo) is not None or False this way you always get True or False ok, for this case it is ok but when you have a class that uses

Re: [Zope3-Users] Security between Context and View

2006-05-15 Thread Dominik Huber
Klaus Bremer wrote: You can try to bypass the zope security mechanism by using 'removeSecurityProxy': from zope.security.proxy import removeSecurityProxy ... def doTransaction(self): transaction = removeSecurityProxy(self.context.produceTransaction()) ... If possible it's better to

Re: [Zope3-Users] Application instantiation without ZMI

2007-06-19 Thread Dominik Huber
John Maddison wrote: I've just started playing around with using z3c.layer to create applications that don't use the ZMI at all. Everything is pretty simple so far, except for one fairly important step: creating my initial application object in the ZODB. What methods do people use to create