[mod_python] Flexible imports

Ron Alford ronwalf at umd.edu
Sun Mar 7 18:18:47 EST 2004


Colin Fox wrote:

> Here's my .htaccess file:
> 
> DirectoryIndex index.xml index.html index.py
> AddHandler python-program .xml .py
> PythonHandler xml_handler
> PythonDebug on
> PythonAutoReload on
> 

You're setting the PythonHandler for everything with that line
I believe the syntax for PythonHandler in this case is
PythonHandler xml_handler | .xml
PythonHandler foo_handler | .py

Or, if you're like me and stuck with apache 1.3,
<Files *.xml>
   PythonHandler xml_handler
</Files>
<Files *.py>
   PythonHandler foo_handler
</Files>



Hope this helps,
-Ron


More information about the Mod_python mailing list