[mod_python] Several handlers

Graham Dumpleton grahamd at dscpl.com.au
Fri Jan 12 16:39:35 EST 2007

On 13/01/2007, at 7:37 AM, export at hope.cz wrote:

> In my httpd.conf, I use
> ....
> ....
>  SetHandler python-program
>   PythonHandler django.core.handlers.modpython
> ...
> ...
> now I would like to add my own PythonInputFilter.
> How can  I add PythonInputFilter into httpd.conf?
> I tried to add
>  PythonInputFilter django.core.handlers.modpython

Check the mod_python documentation. You don't have enough arguments
to this directive for a start and you also need AddInputFilter or  
to actually activate it as the PythonInputFilter directive only  
registers it, not
set it up for use. See:


> but it does not work.
> The function inputfilter(filter)  was added into   
> django.core.handlers.modpython file.
> Or must I use  a separate file, different from  
> django.core.handlers.modpython file?

My question now would be what are you trying to actually do? Unless  
you are
one of the developers of Django, why are you sticking the input  
filter in the
Django source code? Either location is okay, but if you aren't one of  
the Django
developers trying to enhance it in some way, put it in its own module  


More information about the Mod_python mailing list