-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Martijn Jacobs wrote:
> Hmm, that's strange.
>
> Maybe if you call the __getitem__ function itself? :
>
> return Folder.__getitem__(self, key)
>
> It should be working though
>
Unless this is *inside* your own implementaiton of '__getitem__',
Hmm, that's strange.
Maybe if you call the __getitem__ function itself? :
return Folder.__getitem__(self, key)
It should be working though
__getitem__ raise an exception :
*Error Type: AttributeError*
*Error Value: 'super' object has no attribute '__getitem__'
my class derive from
(Ob
__getitem__ raise an exception :
*Error Type: AttributeError*
*Error Value: 'super' object has no attribute '__getitem__'
my class derive from
(ObjectManager, BTreeFolder2, PropertyManager):
I test :
**(ObjectManager, Folder PropertyManager):*
**and got the same exception
the method of Sa
Hi Stéphane.
Check out
http://www.zope.org/Documentation/Books/ZDG/current/ObjectPublishing.stx
See the heading "Traversal methods" where this is explained.
Martijn.
Great, I should test this code tonight !
some more question : id don't understand the two different usage of
__getitem__
Great, I should test this code tonight !
some more question : id don't understand the two different usage of
__getitem__
and __bobo_traverse__. __bobo_traverse__ seems to be a way to control
url walk and __getitem__ control the way attributs can be load by zope.
If I change the URL when I use __b
If you have a zope product you can do something like this indeed :
class MyContainer(Folder):
"""My Folderish Product"""
def mydoc_xls(self, REQUEST=None):
"""My new xls method"""
return "My new xls method"
def __getitem__(self, key):
"""Check for mydoc.xls, then return my
Hi!
Hey, Tres, could you point us to a web example or a web page with more
information about that technique?
I'm very interested on it and the technique that was introduced sometime ago
about how to return a string as __bobo_traverse__ response but the example
was uncompleted (for me at least)
Thi
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Martijn Jacobs wrote:
> Maybe a simple solution :
>
> Do you use apache as a frontend for your zope? If you do you can rewrite
> the incoming url's for example like this :
>
> RewriteEngine On
> RewriteRule ^/folder/mydoc.xls(.*)
> http://localhos