Nicolas Lehuen
nicolas at lehuen.com
Thu Dec 2 08:49:54 EST 2004
Hi, This works on my Apache server : LoadModule python_module python/mod_python.so AddHandler mod_python .py .psp PythonHandler mod_python.publisher | .py PythonHandler mod_python.psp | .psp In your config, you have multiple "AddHandler" directives. My config only has one, with multiple "PythonHandler" directives which have an extension restriction (using the pipe symbol). Regards, Nicolas > -----Message d'origine----- > De : mod_python-bounces at modpython.org > [mailto:mod_python-bounces at modpython.org] De la part de Lee E. Brown > Envoyé : jeudi 2 décembre 2004 14:22 > À : mod_python at modpython.org > Objet : Re: [mod_python] Execution Order of Handlers & MVC in > mod_python > > 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? > > _______________________________________________ > Mod_python mailing list > Mod_python at modpython.org > http://mailman.modpython.org/mailman/listinfo/mod_python >
|