[mod_python] Good example site with py, psp, and structure

durumdara durumdara at gmail.com
Wed Sep 20 06:32:23 EDT 2006

Hi !

I want to understand the modpy technics, to I create good structure for 
my new modpy site. An example needed.

I used PHP, Zope, CGI before this project.

If I understand it good, I can specify one handler script for one directory.
Anywhere, where I specify a handler, the handler script working for all 
.py (both for existing and not existing).
So if I need a centralized web application, I need to import a shared 
module that helps me to start and finish to handle the process 
(example:  pre - collect the important informations, make global 
variables, open the db connections, open the session datas; post - save 
the session if need, close the db connection, drop the content if we 
have redirection, etc.). I thinking good ?

But I need to protect some area in the htdocs (restricted area). How to 
I force it ? (auth module ?). I need to define to every dir I used 
(httpd.conf) ?

In Zope the header/footer objects used for handle the pre/post actions, 
and the zpts/scripts used for make the content of the page.
Is better to I use psp-s that call pre/post scripts, or is better if I 
use py scripts, and they are get psp-s I need ?

How to avoid to user type any .py to browser's address textbox, and get 
same result that handler present ?
Example: I use main.py for handle requests. The address is: 
The user can type www.foo.hu/sux.py, and get same result !

How to prevent the .py extension showing in the browser ?
To I see (can type):
I want to protect my site - if anyone see it, he/she don't know, what 
engine I used.

Thanks for your answers:

More information about the Mod_python mailing list