What I want is to be able to pretend that a certain folder exists when it doesn't. From a database of directory structures I would like to be able to build up fake folders that don't exist. So instead of http://host/directory?dir_id=345 I would like to have http://host/directory/Business/Entertainment/Music How do I go abouts doing this? --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.361 / Virus Database: 199 - Release Date: 2002-05-07
Found it myself. http://aspn.activestate.com/ASPN/Mail/Message/1037888 But I need to do a bit more work. At 09:42 2002-07-22 +0100, Peter Bengtsson wrote:
What I want is to be able to pretend that a certain folder exists when it doesn't. From a database of directory structures I would like to be able to build up fake folders that don't exist. So instead of http://host/directory?dir_id=345 I would like to have http://host/directory/Business/Entertainment/Music
How do I go abouts doing this?
--- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.361 / Virus Database: 199 - Release Date: 2002-05-07
--- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.361 / Virus Database: 199 - Release Date: 2002-05-07
From the /directory object return a non-persistent object that has security declarations and a __bobo_traverse__ method which returns an object that contains its "children". Each of those children can have children ad infinitum. See the Zope Developer's Guide Object Publishing chapter for more info on __bobo_traverse__.
----- Original Message ----- From: "Peter Bengtsson" <mail@peterbe.com> To: <zope@zope.org> Sent: Monday, July 22, 2002 4:42 AM Subject: [Zope] Pretend folders
What I want is to be able to pretend that a certain folder exists when it doesn't. From a database of directory structures I would like to be able to build up fake folders that don't exist. So instead of http://host/directory?dir_id=345 I would like to have http://host/directory/Business/Entertainment/Music
How do I go abouts doing this?
-------------------------------------------------------------------- ------------
--- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.361 / Virus Database: 199 - Release Date: 2002-05-07
Peter Bengtsson wrote:
What I want is to be able to pretend that a certain folder exists when it doesn't. From a database of directory structures I would like to be able to build up fake folders that don't exist. So instead of http://host/directory?dir_id=345 I would like to have http://host/directory/Business/Entertainment/Music
How do I go abouts doing this?
Maybe PathHandler, one of the nice products from the NIP guys, is a good starting point: "The Path Handler product lets you handle URLs which don't correspond to objects. For example, if ph is a Path Handler, then, in the following URL: http://a.server/ph/1/2/3/4" See: http://www.zope.org/Members/NIP/PathHandler HTH, oliver
Maybe PathHandler, one of the nice products from the NIP guys, is a good starting point:
That was more or less what I wanted. It came too late though. Now I've already written a tiny product that uses __before_publishing_traverse__ and has a ignore/skip mechanism that is specifically relevant to our development. Thank you for the tip anyways.
"The Path Handler product lets you handle URLs which don't correspond to objects.
For example, if ph is a Path Handler, then, in the following URL:
See: http://www.zope.org/Members/NIP/PathHandler
HTH, oliver
--- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.361 / Virus Database: 199 - Release Date: 2002-05-07
--- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.361 / Virus Database: 199 - Release Date: 2002-05-07
Oliver Bleutgen <myzope@gmx.net> wrote:
Peter Bengtsson wrote:
What I want is to be able to pretend that a certain folder exists when it doesn't. From a database of directory structures I would like to be able to build up fake folders that don't exist. So instead of http://host/directory?dir_id=345 I would like to have http://host/directory/Business/Entertainment/Music
How do I go abouts doing this?
Maybe PathHandler, one of the nice products from the NIP guys, is a good starting point:
"The Path Handler product lets you handle URLs which don't correspond to objects.
For example, if ph is a Path Handler, then, in the following URL:
Note that you can also do that easily with the traverse_subpath binding of a Python Script. Florent -- Florent Guillaume, Nuxeo (Paris, France) +33 1 40 33 79 87 http://nuxeo.com mailto:fg@nuxeo.com
How does one use the traverse_subpath binding to do this? Kevin -----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Florent Guillaume Sent: Tuesday, July 23, 2002 7:31 AM To: zope@zope.org Subject: Re: [Zope] Pretend folders Oliver Bleutgen <myzope@gmx.net> wrote:
Peter Bengtsson wrote:
What I want is to be able to pretend that a certain folder exists when it doesn't. From a database of directory structures I would like to be able to build up fake folders that don't exist. So instead of http://host/directory?dir_id=345 I would like to have http://host/directory/Business/Entertainment/Music
How do I go abouts doing this?
Maybe PathHandler, one of the nice products from the NIP guys, is a good starting point:
"The Path Handler product lets you handle URLs which don't correspond to objects.
For example, if ph is a Path Handler, then, in the following URL:
Note that you can also do that easily with the traverse_subpath binding of a Python Script. Florent -- Florent Guillaume, Nuxeo (Paris, France) +33 1 40 33 79 87 http://nuxeo.com mailto:fg@nuxeo.com _______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
http://www.google.com/search?q=traverse_subpath Florent On Tue, 2002-07-23 at 17:32, Kevin Carlson wrote:
How does one use the traverse_subpath binding to do this?
Kevin
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Florent Guillaume Sent: Tuesday, July 23, 2002 7:31 AM To: zope@zope.org Subject: Re: [Zope] Pretend folders
Oliver Bleutgen <myzope@gmx.net> wrote:
Peter Bengtsson wrote:
What I want is to be able to pretend that a certain folder exists when it doesn't. From a database of directory structures I would like to be able to build up fake folders that don't exist. So instead of http://host/directory?dir_id=345 I would like to have http://host/directory/Business/Entertainment/Music
How do I go abouts doing this?
Maybe PathHandler, one of the nice products from the NIP guys, is a good starting point:
"The Path Handler product lets you handle URLs which don't correspond to objects.
For example, if ph is a Path Handler, then, in the following URL:
Note that you can also do that easily with the traverse_subpath binding of a Python Script.
Florent
-- Florent Guillaume, Nuxeo (Paris, France) +33 1 40 33 79 87 http://nuxeo.com mailto:fg@nuxeo.com
participants (5)
-
Chris McDonough -
Florent Guillaume -
Kevin Carlson -
Oliver Bleutgen -
Peter Bengtsson