[mod_python] Where do you put your py modules... ? [alias paranoid protector]

durumdara durumdara at gmail.com
Mon Oct 9 08:23:52 EDT 2006


Sean Davis írta:
> Why not make a "Page" class that contains all the functionality that you want 
> for each page, and then inherit from it to supply the body?  Alternatively, 
> use a template system (as you suggest).  
>
>   
Dear Sean !

This is very-very good idea !
I have only one question:
I must set the python handler script in the apache config. This is a 
file (one file).
So Apache call this file to handle all of the requests.
Because that I need to call a page class that user requested 
(req.filename), if I want to show result presented with this (inherited) 
page class.

Apache - > Handler -> myscript::handler -> req.filename -> 
call(req.filename) -> return

Or is exists another way to set Apache: if the requested file have .py 
extension, Apache start it without your call (with predefined user 
function) ?

Apache -> ?.py? req.filename -> call(req.filename) -> return

Thanks for your help, and thanks for help I got from everybody:
dd





More information about the Mod_python mailing list