Python Webpages

Jon Ribbens jon+usenet at unequivocal.co.uk
Mon Apr 29 12:05:21 EDT 2002


In article <mailman.1020090053.19284.python-list at python.org>, François Pinard wrote:
>> Can you think of an example where the "extra power" provided by a more
>> complicated templating system actually makes something easier to do than
>> with jonpy? ;-)
> 
> To really reply, one would have to study `jonpy'.

Yes. But I know that Paul, who I was replying to, is somewhat familiar
with jonpy and hence would most likely in a position to be able to
answer the question.

> Yet, I got from an earlier message that `jonpy' does not allow
> arbitrary Python in the HTML pages.

It does not allow code of any sort in the HTML pages. This is because
I do not think that code of any sort should be in the HTML pages. Code
and HTML are separate things that belong in separate files rather than
muddled together.

> Like many others, I made my own templating system, but did not overly
> publish it as there are so many already.  Surely in my case, I would loose
> big if I was not allowed to link Web pages with installed Python modules,
> these take care of database access, specialised HTML formatting (that
> would only encumber the templating language if it was done there), etc.

Linking web pages with installed Python modules is exactly what jonpy
does.

> In fact, before writing my own, I glanced around to see what was written,
> and my overall feeling was that systems were either weakish or over-bloated.

Yes, that's why I made my system too.

> If you nicely marry Python with your templating system, you get an extremely
> powerful templating system that is also very simple.

Yes, that's what jonpy does. It doesn't involve putting the Python
code in the same file as the HTML though.

> The power _is_ needed.

Yes, it is my belief that jonpy, while being very simple, is also very
powerful. Hence my question to Paul about what features of other more
complicated templating systems make him feel that they have "extra
power" in comparison, because personally I can't think of any.

Cheers


Jon



More information about the Python-list mailing list