Re: [Zope] context in fs product
Lennart Regebro schrieb:
It's usually called "self"...
hmmm ... strange ... in a class: class Controller(Implicit,ObjectManager, SimpleItem): """asfd""" I have a method: def testspace(self,REQUEST=None): """tests""" req = self.absolute_url(self) return req and on whatever URL I call it , it returns the base URL of the product instance ... All classes in the product subclass form Acquisition.Implicit. What am I missing here? Thanks so far! Roman
+-------[ Roman Klesel ]---------------------- | Lennart Regebro schrieb: | > It's usually called "self"... | I missed the start of this thread... | hmmm ... strange ... | | in a class: | | | class Controller(Implicit,ObjectManager, SimpleItem): | """asfd""" | | I have a method: | | def testspace(self,REQUEST=None): | """tests""" | req = self.absolute_url(self) | return req self.absolute_url() You shouldn't need to pass self in. | and on whatever URL I call it , it returns the base URL of the product instance ... | | All classes in the product subclass form Acquisition.Implicit. What am I missing here? | | Thanks so far! Is it set inside the ZODB yet? -- Andrew Milton akm@theinternet.com.au
Hello, Andrew Milton schrieb:
| Thanks so far!
Is it set inside the ZODB yet?
*bling* yes, that kicked me out of the mental loop. As you suggested this test class is not in ZODB and therefore the aquisition does not work. Therefore my testcase is useless and I've to investigate my problem in a different way. Thanks Roman
On 2/20/06, Roman Klesel <roman_plonemail@lotuseyes.de> wrote:
Therefore my testcase is useless and I've to investigate my problem in a different way.
Ah. Read this: http://www.catb.org/~esr/faqs/smart-questions.html Especially: "Be precise and informative about your problem" and "Describe the problem's symptoms, not your guesses". -- Lennart Regebro, Nuxeo http://www.nuxeo.com/ CPS Content Management http://www.cps-project.org/
participants (3)
-
Andrew Milton -
Lennart Regebro -
Roman Klesel