[mod_python] is not a file?

Graham Dumpleton grahamd at dscpl.com.au
Tue Jan 25 05:25:51 EST 2005


On 25/01/2005, at 8:55 PM, Jon Mercer wrote:
>
> As a further question in this thread, what is the proper way/best 
> practice
> to be mixing directories with different methods of calling mod_python? 
> Can
> the same directory handle the publisher as well as psp and custom
> mechanisms?

Using just mod_python, one can only really achieve this mixing by 
assigning
different extension types in URLs to the different implementation 
mechanisms.

   AddHandler mod_python.psp .psp
   AddHandler mod_python.mpservlets .mps
   AddHandler mod_python.publisher .py
   AddHandler mycustommechanism .mypy

I personally don't like this approach as it exposes implementation 
details
and looks plain messy having all these different extensions.

As an alternative therefore, you might have a look at Vampire.

   http://www.dscpl.com.au/projects/vampire

Vampire takes the approach of exposing resources based on the type of 
content
being returned, rather than implementation mechanism. It allows one to 
use
a .html extension (for example), but where the implementation could be 
PSP,
mpservlets or a customer handler. The only thing it doesn't have is a 
way of
mixing with mod_python.publisher, but then the mechanism is has for 
custom
handlers is probably preferred over the magic of mod_python.publisher 
as it
is less problematic.

Anyway, if interested, check out the web site.

Graham



More information about the Mod_python mailing list