Suggestions for structure of HTML-generating app

Stefan Behnel stefan_ml at behnel.de
Thu Feb 7 05:08:02 EST 2008


lanwrangler at gmail.com wrote:
> On Feb 5, 9:14 pm, Bernard <bernard.ch... at gmail.com> wrote:
>> On 5 fév, 10:09, "lanwrang... at gmail.com" <lanwrang... at gmail.com>
>> wrote:
> 
>>> Are there any good approaches of doing this kind of thing that I've
>>> missed, or am I resigned to having HTML and Python code mixed and so
>>> will just have to keep all that nastiness to as few modules as
>>> possible?
>>> Thanks,
>>>   Matthew.
>> we use Cheetah templates to do just that at my workplace.
>> we use CherryPy to generate the data and then we pass it on
>> to the Cheetah template which handles the data and add html over it.
>> here's an article on that matter :http://www.onlamp.com/pub/a/python/2005/01/13/cheetah.html
> 
> Thanks for the pointer to Cheetah.  At first glance it looks neat.
> Cherrytemplate has done well for me so far but I don't think it's
> under
> active development any more so it may be time to migrate.

You might also be interested in webstring:

http://psilib.sourceforge.net/webstring.html

(and then, there's tons of other templating packages for Python...)

Stefan



More information about the Python-list mailing list