[Zope] Can't access my zope product functions by URL

Anders Karlsson pugo at cendio.se
Wed Feb 23 10:32:24 EST 2005


I have made my first attempts on developing my own products in Python and I 
have a problem I can't find any solution to. My problem is that I can't 
access functions in my product by the URL. I have tried to find what's wrong 
for several days now, but I can't really find anything.

I have used the boring-product example product as base for my tries and my 
initialization is pretty much the same. My "__init__.py" file registers a 
class called RSSFeed and just as the boring-product it currently only 
contains functions to add the object to the Zope object-DB, view the object 
and change the title. 

When the user changes the title it uses a form that calls the function 
manage_edit(). The problem is that when I do that I get a 404 error telling 
that the file "http://www.myserver.org/test/myobject/manage_edit" doesn't 
exist. What makes my hair fading to gray is that my code for this is almost 
identical to the boring-product example and there it works! One major 
difference is that I call the "security.declareProtected()" function to 
register my function and boring-product uses an "__ac_permissions__" list 
instead. But I declare my function access rights just as all other products 
I've looked at.

Also other functions I make in my product and declares the same way gives the 
404 error. One interesting thing is that I can call them from inside my 
index.dtml file for the product, by doing <dtml-var function>-calls. 

I guess I have missed something with the security settings, but I can't find 
what it is. Please help me if you can, I am getting insane trying to find it 
myself. 

You can see the code for my RSSFeed class attached to this mail.
My Zope version is 2.7.4. 

-- 
--------------------------------------------------------------------------
Anders Karlsson                        Email:  anders.karlsson at cendio.se
Cendio AB                              WWW:    www.cendio.se
Teknikringen 3,                        Voice:  +46 - (0)13 - 21 46 00
SE-583 30  LINKÖPING, SWEDEN           Fax:    +46 - (0)13 - 21 47 00
-------------- next part --------------
A non-text attachment was scrubbed...
Name: RSSFeed.py
Type: application/x-python
Size: 1916 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope/attachments/20050223/94ad77a4/RSSFeed-0001.bin


More information about the Zope mailing list