Ticket #5682 enhancement new
Clarify sub-view vs. iteration on twisted.web.template howto
| Reported by: | jpwarren | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | website | Keywords: | web |
| Cc: | oubiwann | Branch: | |
| Author: | Launchpad Bug: |
Description
The instructions at http://twistedmatrix.com/documents/current/web/howto/twisted-templates.html for sub-views continues on after the example on iteration. This was confusing for me as an experienced Twisted person, but a novice with twisted.web and templates.
I'm familiar with other templating systems, and the "include HTML/XML fragments from another file into this master file" pattern. I was trying to figure out how to do with with twisted.web, assuming (correctly) that it was probably relatively straightforward, once known.
Providing a simple MasterPageElement and a couple of SubPageElements that use XMLFile loaders to load different .xml file templates would, I think, demonstrate the idea more clearly to a novice.
I'll work up some example code and include as a ticket update.
