[mod_python] is not a file?

Graham Dumpleton grahamd at dscpl.com.au
Tue Jan 25 16:10:07 EST 2005


On 25/01/2005, at 9:25 PM, Graham Dumpleton wrote:

>
> 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.

Hmmm, I shouldn't like that approach as it will not work how I wrote 
that. Wish
people would correct me when I go too quick and spout bullshit. Knew I 
should
have gone to sleep early.

Lets see if I can get it right this time.

   <Files *.psp>
   AddHandler mod_python .psp
   PythonHandler mod_python.psp
   </Files>
   <Files *.mps>
   AddHandler mod_python .mps
   PythonHandler mod_python.mpservlets
   </Files>
   <Files *.py>
   AddHandler mod_python .py
   PythonHandler mod_python.publisher
   </Files>

Or:

   SetHandler mod_python

   <Files *.psp>
   PythonHandler mod_python.psp
   </Files>
   <Files *.mps>
   PythonHandler mod_python.mpservlets
   </Files>
   <Files *.py>
   PythonHandler mod_python.publisher
   </Files>

Or:

   SetHandler mod_python

   PythonHandler mod_python.psp | .psp
   PythonHandler mod_python.mpservlets | .mps
   PythonHandler mod_python.publisher | .py

Is that better?

:-(



More information about the Mod_python mailing list