For a comprehensive example of templating check out
www.zope.com. Zope among other things is an object-oriented web developement framework implemented in python. It also provides it's own http listener (Zserver) and an object-oriented database (ZODB). Yes all of the acronyms associated with zope do start with Z. I looked at this seriously for awhile before I switched over to porting the ACS, but I found that it was overly complicated, and I didn't particularly care for the dtml language that was used for building dynamic pages. Alot of the things that happen in the Zope system seem like black magic, and by most accounts it has large learning curve. It is flexible enough that you could build an ACS equivalent written in python. It can also be configured to run on top of apache instead of using Zerver.