can call script via url but not from script

Joachim Schmitz <[email protected]>
Newsgroups gmane.comp.web.zope.cps.devel
Message-ID <[email protected]>
In the port_root I have a ProxyFolder campus of portal_type University.
In the University-Class I defined a routine to get a certain value.

when I call this via the browser-url like so:

http://www.test.de/srp/campus/getHallTitle?hall=xxx

the correct title is returned.

but when I call it in a script:

context.portal_url.getPortalObject().campus.getHallTitle("xxx")

I get an attribute error "getHallTitle"

this works also in a script:

context.restrictedTraverse("%s/campus/getHallTitle" % 
(context.portal_url.getPortalPath()))("xxx")

I consider this a little bit weird

-- 
Gruß Joachim



_______________________________________________
cps-devel mailing list
http://lists.nuxeo.com/mailman/listinfo/cps-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.