[mod_python] Execution Order of Handlers & MVC in mod_python

Lee E. Brown Administrator at leebrown.org
Thu Dec 2 08:22:10 EST 2004


Greetings!

Try this:

    <Directory "/Users/amarre/Sites/web-app/">
        AddHandler mod_python .py .psp
        PythonDebug On
        <Files "*.py">
            PythonHandler hello
        </Files>
        <Files "*.psp">
            PythonHandler mod_python.psp
        </Files>
    </Directory>

Best Regards,
Lee E. Brown

----- Original Message ----- 
From: "Alexis Marrero-Narváez" <amarrero at mitre.org>
To: <mod_python at modpython.org>
Sent: Wednesday, December 01, 2004 8:33 PM
Subject: [mod_python] Execution Order of Handlers & MVC in mod_python


>I need enlightenment with this subject. I have the following configuration.
>
> Alias /python/ "/Users/amarre/Sites/web-app/"
> <Directory "/Users/amarre/Sites/web-app/">
>     AddHandler mod_python .py
>     PythonHandler hello
>     AddHandler mod_python .psp
>     PythonHandler mod_python.psp
>     PythonDebug On
> </Directory>
>
> In my /Users/amarre/Sites/web-app/ I have two files hello.py and 
> hello_a.psp. If I visit the url http://localhost/python/hello_a.psp I 
> display the ouput of hello.py concatenated with the output of hello_a.psp. 
> This tells me that one (hello.py) was executed before the other one 
> (hello_a.psp).
>  I understand that if I define more than one handle they executed in the 
> order they are added but, the first handler was added for ".py" files and 
> the second one for ".psp". And that's what is confusing me.
>
> How can I change the configuration to have both files coexist in the same 
> directory while executing just the one being addressed by the URL? 



More information about the Mod_python mailing list