Re: [Zope] __getitem__ and returning a PageTemplateFile instance

2005-10-21 Thread Anders Bruun Olsen
On Thu, Oct 20, 2005 at 09:43:24PM +0200, Dieter Maurer wrote: asonhe is not there, but vitester has a __getitem__ method which executes a PageTemplateFile instance and returns it. I.e. Thus, it returns a string. However, ZPublisher requires that all intermediate traversal steps return an

Re: [Zope] __getitem__ and returning a PageTemplateFile instance

2005-10-21 Thread Chris Withers
Anders Bruun Olsen wrote: Ahh.. that makes sense I guess. It just seems counterintuitive that you can return a string in a normal function, but not in __getitem__. I have a feeling you're after traverse_subpath, which is available in both Python Scripts and Page Templates... cheers, Chris

Re: [Zope] __getitem__ and returning a PageTemplateFile instance

2005-10-21 Thread Dieter Maurer
Anders Bruun Olsen wrote at 2005-10-21 15:06 +0200: ... Ahh.. that makes sense I guess. It just seems counterintuitive that you can return a string in a normal function, but not in __getitem__. Can can return a string from __getitem__ (without problem), *but* you cannot use this string during

Re: [Zope] __getitem__ and returning a PageTemplateFile instance

2005-10-20 Thread Anders Bruun Olsen
On Wed, Oct 19, 2005 at 09:47:50PM +0200, Dieter Maurer wrote: Zope has encountered a problem publishing your object. Cannot locate object at: http://localhost:8080/vitester/asonhe This is a NotFound problem. Zope is unable to locate vitester/asonhe Are you sure, vitester/asonhe is there?

Re: [Zope] __getitem__ and returning a PageTemplateFile instance

2005-10-20 Thread Dieter Maurer
Anders Bruun Olsen wrote at 2005-10-20 11:52 +0200: On Wed, Oct 19, 2005 at 09:47:50PM +0200, Dieter Maurer wrote: Zope has encountered a problem publishing your object. Cannot locate object at: http://localhost:8080/vitester/asonhe This is a NotFound problem. Zope is unable to locate

Re: [Zope] __getitem__ and returning a PageTemplateFile instance

2005-10-19 Thread Anders Bruun Olsen
On Tue, Oct 18, 2005 at 08:47:23PM -0500, J Cameron Cooper wrote: error_log is by default set to ignore three common types of exceptions. You should remove NotFound from the list if you're getting NotFound exceptions and want to see them. Ahhh.. Thanks, now I have a traceback, unfortunately

Re: [Zope] __getitem__ and returning a PageTemplateFile instance

2005-10-19 Thread Dieter Maurer
Anders Bruun Olsen wrote at 2005-10-17 00:59 +0200: Zope has encountered a problem publishing your object. Cannot locate object at: http://localhost:8080/vitester/asonhe This is a NotFound problem. Zope is unable to locate vitester/asonhe Are you sure, vitester/asonhe is there?

Re: [Zope] __getitem__ and returning a PageTemplateFile instance

2005-10-18 Thread J Cameron Cooper
Anders Bruun Olsen wrote: On Sun, Oct 16, 2005 at 06:50:09PM +0200, Dieter Maurer wrote: I am trying to make a product where-in I want to be able to return a page based on the url, think something like /product/username which would return a page with the users details. For this purpose I am

Re: [Zope] __getitem__ and returning a PageTemplateFile instance

2005-10-18 Thread Anders Bruun Olsen
On Tue, Oct 18, 2005 at 03:30:42PM -0500, J Cameron Cooper wrote: error_log is by default set to ignore three common types of exceptions. You should remove NotFound from the list if you're getting NotFound exceptions and want to see them. Ahhh.. Thanks, now I have a traceback, unfortunately

Re: [Zope] __getitem__ and returning a PageTemplateFile instance

2005-10-18 Thread J Cameron Cooper
Anders Bruun Olsen wrote: On Tue, Oct 18, 2005 at 03:30:42PM -0500, J Cameron Cooper wrote: error_log is by default set to ignore three common types of exceptions. You should remove NotFound from the list if you're getting NotFound exceptions and want to see them. Ahhh.. Thanks, now I have

Re: [Zope] __getitem__ and returning a PageTemplateFile instance

2005-10-16 Thread Dieter Maurer
Anders Bruun Olsen wrote at 2005-10-14 11:53 +0200: ... I am trying to make a product where-in I want to be able to return a page based on the url, think something like /product/username which would return a page with the users details. For this purpose I am using __getitem__, but when I return a

Re: [Zope] __getitem__ and returning a PageTemplateFile instance

2005-10-16 Thread Anders Bruun Olsen
On Sun, Oct 16, 2005 at 06:50:09PM +0200, Dieter Maurer wrote: I am trying to make a product where-in I want to be able to return a page based on the url, think something like /product/username which would return a page with the users details. For this purpose I am using __getitem__, but when