Re: [Zope] Acquisition inquisition
The short of it is that the actual container of "education" is / and not "test". The long of it is in this message by Jim Fulton: http://www.egroups.com/list/zope/md1921706242.html Kevin -----Original Message----- From: Ben Glazer <glazer@scicomp.com> To: Zope Mailing List <zope@zope.org> Date: Wednesday, September 22, 1999 9:59 PM Subject: [Zope] Acquisition inquisition
I appear to misunderstand how acquisition works in Zope, as it's not behaving like I expect it should.
This is what my folder structure looks like in Zope:
/ + test + education
Both / and test contain DTML methods called standard_html_header. A file in /test/education contains the following line:
<dtml-var standard_html_header>
This causes the header in / to be used, and not the one in /test. I thought that methods were acquired from containers. Since /test contains education more immediately than / contains /test/education, why does a DTML method in /test/education seem to default to acquiring methods from / ?
Kevin Dangoor wrote:
The short of it is that the actual container of "education" is / and not "test". The long of it is in this message by Jim Fulton: http://www.egroups.com/list/zope/md1921706242.html
Ok, so I guess I had gotten it wrong too. I thought that the direct mapping of objects to URL's meant that the acquisition path was implicit in the URL too, and that by manipulating the URL you could manipulate the acquisition path and override default acquired properties and methods in different ways. I guess I'm going to have to rethink some stuff I was planning. <idle_speculation> Hmm, maybe if I design things so that all properties are contained in objects that MUST be put into the URL, and are not in the direct acquisition path at all.... This would mean adding code for conditions where no default property is set, but could be workable. </idle_speculation> BTW, what would break (internally to zope) if this was changed so that the acquisition path DID derive directly from the URL? Michael Bernstein.
At 20:10 23-9-99 , Michael Bernstein wrote:
Kevin Dangoor wrote:
The short of it is that the actual container of "education" is / and not "test". The long of it is in this message by Jim Fulton: http://www.egroups.com/list/zope/md1921706242.html
Ok, so I guess I had gotten it wrong too. I thought that the direct mapping of objects to URL's meant that the acquisition path was implicit in the URL too, and that by manipulating the URL you could manipulate the acquisition path and override default acquired properties and methods in different ways. I guess I'm going to have to rethink some stuff I was planning.
<idle_speculation> Hmm, maybe if I design things so that all properties are contained in objects that MUST be put into the URL, and are not in the direct acquisition path at all.... This would mean adding code for conditions where no default property is set, but could be workable. </idle_speculation>
This is what I do now.
BTW, what would break (internally to zope) if this was changed so that the acquisition path DID derive directly from the URL?
Certain security features would. You can't override the local context of an object with your own version. -- Martijn Pieters, Web Developer | Antraciet http://www.antraciet.nl | T: +31 35 7502100 F: +31 35 7502111 | mj@antraciet.nl http://www.antraciet.nl/~mj | PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149 ---------------------------------------------
participants (3)
-
Kevin Dangoor -
Martijn Pieters -
Michael Bernstein