web Develop question

Luis M. González luismgz at gmail.com
Thu Jun 29 02:48:03 CEST 2006

gerkarcher at gmail.com wrote:
> Dear Luis ,
> Thanks for your kindly answer , so you say that installing mod_python
> and a template like chetaah or dyango I can do like as I do with php
> and Apache ?

Do not get confussed:
Django is a complete web development framework, and "Cheetah" is just a
template engine.

You don't need any framework to use mod_python (although many
frameworks use mod_python as a deployment option, as well as CGI or
FastCGI, etc).
Mod_python is just the module that lets you use python with Apache.

However, it has some built-in capabilities for letting you build web
They are called "handlers". You can write your own handlers, or you can
use the ones included within mod_python.

The main two handlers are:
1) PSP: this stands for Python Server Pages, and it is a way to parse
scripts in a PHP-like way. For example, you enclose your python
instructions between <% and %> tags, and your can mix them within html.
However, it is not very polished and I would recomend it...

2) Publisher: It lets you write scripts where you define functions,
that correspond to different pages. For example, if you define a
function "index" it will contain the code to display your main page.
This way you can create a whole site with only one script.
You can include html code within these functions, but it is recommended
to use a template system combined with publisher, in order to separate
presentation and logic.
Cheetah is a very good templating engine.

I suggest you start by reading mod_python's documentation, and then,
when you are up and running with all your installation, you can check

Hope it helps...


More information about the Python-list mailing list