Re: [Zope3-Users] How to make content object return a view?

2006-05-25 Thread TAHARA Yusei
Hi. > >I tried zapi.getView(), but this has been deprecated, and I don't quite >understand the best approach. > You need to use zapi.getMultiAdapter. (this is a alias for zope.component.getMultiAdapter) Because content view is named multiadapter for content's interface and IBrowserRequest interfa

Re: [Zope3-Users] building Zope3 on Solaris 10

2006-05-25 Thread Damon Register
Kamal Gill wrote: Hi Damon, I'm not sure if this will help, but here's my build notes from the Zope 3.2.1 OS X Installer (with OSX-specific details removed)... It seems that I was chasing the wrong thing. I was trying to install Twisted with Zope3 interface. I couldn't get Zope3 or the in

Re: [Zope3-Users] Maintaining data fields on form edit

2006-05-25 Thread mats.nordgren
This seems to work class EditForm(form.EditForm): form_fields = form.Fields(ISchema) def __init__(self, context, request): self.context, self.request = context, request @form.action('Edit') def handle_edit_action(self, action, data): if data['image'] != None: self.context.i

Re: [Zope3-Users] Calling PageTemplate in Content object

2006-05-25 Thread David Johnson
I was able to duplicate the example from zope.pagetemplate.readme.txt. However I still have 2 problems: 1. I receive no debugging or exception output when there are problems 2. I cannot figure out how to call context or viewlet objects. Obviously Zope/Python is ignoring exceptions for me in cert

[Zope3-Users] How to make content object return a view?

2006-05-25 Thread David Johnson
I have a content object, that I want to return a view. How is this done? This situation seems to come up frequently for me. What do you do? In this case, the content object is a fax. The fax will include browser views as part of it's body. I tried zapi.getView(), but this has been depreca

Re: [Zope3-Users] There isn't enough context to get URL information.

2006-05-25 Thread Achim Domma
Stephan Richter wrote: On Thursday 25 May 2006 05:50, Achim Domma wrote: class Workspace(Persistent): implements(IWorkspace) This is your problem. Workspace is not implementing ILocation (or IContained). Thanks a lot! It works now! Do I understand the problem right: I was able to inse

Re: [Zope3-Users] There isn't enough context to get URL information.

2006-05-25 Thread Stephan Richter
On Thursday 25 May 2006 05:50, Achim Domma wrote: > class Workspace(Persistent): >      implements(IWorkspace) This is your problem. Workspace is not implementing ILocation (or IContained). Regards, Stephan -- Stephan Richter CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student) Web2k -

[Zope3-Users] There isn't enough context to get URL information.

2006-05-25 Thread Achim Domma
Hi, I try to figure out how to make attributes holding content objects accessible via the browser. Using the code below, I get a "There isn't enough context to get URL information." exception if I try to access the attribute via URL or via Introspector. The exception is raised in the breadcr

Re: [Zope3-Users] Calling PageTemplate in Content object

2006-05-25 Thread Marco Mariani
David Johnson wrote: >>> orderform = PageTemplateFile('orderform.pt') >> maybe this attribute ought to be called "template" instead of "orderform" ? >> > > Does the name make a difference? Well, no, I was in a hurry, it makes a difference if you inherit from formlib but I see you don't defi

Re: [Zope3-Users] Create complex object

2006-05-25 Thread Achim Domma
Achim Domma wrote: class IWorkspace(Interface): [...] [...] Thanks to Frank for his solution, but I should not post messages late at night: I simply added the fields="title" attribute to the wrong browser:addform. If I add the attribute to the right tag, it works fine. Just for the re

Re: [Zope3-Users] Create complex object

2006-05-25 Thread Frank Burkhardt
On Thu, May 25, 2006 at 02:45:04AM +0200, Achim Domma wrote: [snip] Just create another interface: > class IWorkspace(Interface): > title = TextLine( >title=u"Title", >description=u"The title", >default=u"proCoders Workspace", >required=True) > projects =