[mod_python] Mapping a URI to pages dynamically.

VanL vlindberg at verio.net
Fri May 16 15:57:38 EST 2003

Philip Jägenstedt wrote:
I don't much like this approach, and would like to instead have an URI like
http://site.org/animals/cow, which would give the same result.

What you  want has been termed object publishing by the Zope community, 
and that usage has been (fairly) widely adopted.  I have been 
researching this lately; AFAIK, you have three options that do this with 

1. mod_python publisher handler.  See the documentation on the 
mod_python site.  Advantage: built in, as close to apache as you can 
get.  Disadvantage: as close to apache as you can get.  Any supporting 
infrastructure will need to be written by you.

2. albatross + mod_python.  Albatross allows this sort of thing, see 
their "Random*Apps" and the associated documentation. Advantage: nice 
session management, page processing model. Disadvantage: the 
implementation of the Random Apps leaves a little to be desired -- it 
moves the user around through http redirects.

3. quixote + mod_python. This is a central feature of quixote, and they 
do it very nicely. Advantage: the mapping of the URL-space to the 
code-space is very elegant.  Disadvantage (at least for me): I don't 
like ptl (their html generation system) as much.


More information about the Mod_python mailing list