How to use templating with the web server

Florian Lindner <[email protected]>
Newsgroups gmane.comp.python.twisted.web
Message-ID <1338380.9MTyI3m0Zd@horus>
Hello,

I want to build a simple webinterface for my application and decided to use 
twisted.web with its templating for that. This will be my first contact with 
twisted.

I had found a working example at [1].

Is there a way to render a template that involves less boiler plate code? In 
that example I had to create a template.Element class and a web.Ressource 
class for each page I want to render. The Ressource basically looks always the 
same for each page, just that it renders another Element class.

Is there a way to shortcut that a bit? My standard situation will be that I 
have a template file and an Element class containing the logic. These are 
"mounted" somewehre in the hierarchy (like with putChild).

Sorry, I'm sure I'm lacking quite a bit of insight into twisted.

Thanks!

Florian


[1]
http://groups.google.com/group/pythonmy/browse_thread/thread/bab31751d0e0f78f?pli=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.