[Twisted-web] How to use templating with the web server
Florian Lindner
mailinglists at xgm.de
Sun Aug 21 06:10:04 EDT 2011
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
More information about the Twisted-web
mailing list