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

2005-05-26 Thread Dominik Huber
the interfaces. (See zope.app.component.interface.provideInterface).This function is called by the directive handler (See zope.app.component.metaconfigure.interface). IMO only the therm *provides* is correct in order of the interface introspection: IContentType.providedBy(IMyContent) Re

Re: [Zope3-Users] make a Folder a Site

2005-05-26 Thread Dominik Huber
for creating a LocalSiteManager. We wrote a little initializer package that should support such usecases. svn://svn.tiks.org/repos/Tiks/trunk/src/tiks/initializer - see README.txt for details If anybody is interested we could extend that package and move it to the zope 3 repository Regards

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 http://mail.zope.org/mailman/listi

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

2005-05-29 Thread Dominik Huber
serveral direvtives detect their for- and provides-attributes implicitely. for example: instead of Regards, Dominik Huber ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users

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

2005-05-30 Thread Dominik Huber
only the component.adapts has influence on the zcml configuration. Regards, Dominik Dominik Huber wrote: Sakesun Roykiattisak wrote: component.adapts or __used_for__ Which one is the current preferred method to declare adapter context interface ? component.adapts, __used_for__ was just a

[Zope3-Users] 3rd Zope 3-Mini-Sprint in Switzerland

2005-06-08 Thread Dominik Huber
tical introduction into Zope 3. The workshop is hold in german. If anybody is interested please sign up. Regards, Dominik Huber [1] http://www.zope.ch/ZUGS/minisprints Original Message Zope 3-Mini-Sprint: Navigationsfunktionalitäten: Breadcrumbs, Trees etc. Liebe ZoperInnen In

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 what

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

2005-08-12 Thread Dominik Huber
Stephan Richter wrote: On Friday 12 August 2005 04:20, Dominik Huber wrote: Your question points out the general problematic the implementation decision between classification and composition. Zope 3 has the power to reduce an object to its *pure* identity and implement all further

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? Ther

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

2005-08-15 Thread Dominik Huber
James Allwyn wrote: used the following to get it to also provide this as a property: rating = property(getRating) Yes, but I would not offer both. I would limit the interface to the property only, because the property can used more easily generating generic view such as schemadisplay,

Re: [Zope3-Users] Making site skins

2005-08-16 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 wo

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 th

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. I'v

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 persist

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 hel

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 two

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 objec

Re: [Zope3-Users] Validation of schemas?

2005-10-31 Thread Dominik Huber
[EMAIL PROTECTED] wrote: What I would want to be further explained is: When should I call validateInvariants? Of course I would call it when I'm creating or editing the object. Then, frequently, just after an add or edit form. More: can I then use auto generated forms (by using events after the

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

2005-11-17 Thread Dominik Huber
raise for? Accutally I'm haveing problems finding the code that does this because the traceback is Zope 3 cryptic and I don't have a debugger setup either. (I was hoping not having to care about the innerworks of the catalog, but that maybe is too much too hope for ;-) Johan

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

2005-11-17 Thread Dominik Huber
Johan Carlsson wrote: Dominik Huber wrote: Hi Johan Your problem is that the catalog is not locatable itself during the addition of its indexes (-> state within the create and add method), therefore the location of the indexes cannot be located and the NotYetError is raised. You can m

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 tools['catalo

Re: [Zope3-Users] logout feature with zope3

2005-12-06 Thread Dominik Huber
Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users -- Dominik Huber Perse Engineering GmbH Jurastrasse 9a CH-5406 Baden E-Mail: [EMAIL PROTECTED] Telefon: ++41 56 534 7730 begin:vcard fn:Domin

Re: [Zope3-Users] The page that you are trying to access...

2005-12-08 Thread Dominik Huber
Frank Burkhardt wrote: Hi, When I request a non-existing page from a zope3-server, I get this message: The page that you are trying to access is not available Please note the following: 1. You might have misspelled the url 2. You might be trying to access a non-existing page

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 obj

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 zope.app,

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

2006-02-03 Thread Dominik Huber
Rupert Redington wrote: if you use trusted adapters you have to declare an additional class or content directive for the adapter itself.: regards, dominik ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/ma

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: if you use trusted adapters you have to declare an additional class or content directive for the adapter itself.: regards, dominik Thank you - thats an instafix. I only added the

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 and

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 __conf

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 use

Re: [Zope3-Users] Composing content objects

2006-05-16 Thread Dominik Huber
ion=u"adsf", schema=zope.interface.Interface), Regards, Dominik ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users -- Dominik Huber Perse Engineering GmbH Jurastrasse 9a CH-5406 Bad

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 the