[Boa Constr] Re: Zope Support
Status: Beta
Brought to you by:
riaan
From: Yuppie <yu...@ze...> - 2002-12-12 08:39:46
|
Hi Riaan! Riaan Booysen wrote: > From my investigations into this it looks like CMF objects can be wrapped > just like all the other Zope objects currently supported. There's on thing that could cause trouble: Some meta types (e.g. 'Document') have a different text format ('html', 'structured-text' or 'plain') depending on their text_format attribute. How would I implement different editing views for one Node class depending on an attribute? Or how would I get different Node classes for instances of one meta type? >>The Zope plug-ins are very different to the other plug-ins. Looks like a >>unified plug-in interface would be very helpful for updating the >>ZopeExplorer to Zope 2.6 or writing a CMF plug-in. > > > No. Those comments aren't that accurate anymore. > It has already been unified in the sense that > Editor.openOrGotoModule('zope://Connection/<meta>/path/obj') > works correctly and that Zope items can be bookmarked. One thing that confused me was this: Views are defined - for Zope in the node as defaultViews / additionalViews - for the rest in the controller as DefaultViews / AdditionalViews > Nevermind the differences between Zope transports and the simple > transports, just use the current Zope support as examples, > they all follow basically the same model. Maybe you could give me some hints. I quote ZopePTHTMLView because I have some questions about it. class ZopePTHTMLView(ZopeViews.ZopeHTMLView): viewName = 'Source.html' def generatePage(self): props = self.model.zopeObj.properties url = 'http://%s:%s@%s:%d/%s/source.html'%(props['username'], props['passwd'], props['host'], props['httpport'], self.model.zopeObj.whole_name()) import urllib f = urllib.urlopen(url) return f.read() Q1) zopeObj doesn't work. Should be 'self.model.transport'. Right? Q2) generatePage() is used by additional read only views. For editable data I have to use load() / save(). Right? Q3) urllib.urlopen() is a workaround. I should better use getResource() if possible. Right? > Please go ahead and implement CMF support! > Even just a (working!) prototype would be great. > > If I ever refactor the Zope support further, I promise to also update > the CMF support if its there ;) Thanks. I'll see what I can do. Cheers, Yuppie |