[Twisted-Python] DOMTemplate best practice
mario at ruggier.org
Fri Jan 17 12:24:10 EST 2003
I am playing with the examples and howtos, to try and figure some of
this thing out.
The DOMTemplate HowTo goes through a simple example, and uses 3 files,
the template itself, one for a resource that sits next to the template
file, and one for the
code that actually instantiates the template (and this one must be put
in the pythonpath).
My question is that, given that this 3rd file (webquoteresource.py in
this example) is anyhow
dedicated to this template (and will always be, given that the method
names must match
hook names in the template), why is it kept separate and not part of
the rpy itself?
ps; btw, this example if full of errors, namely:
from TwistedQuotes import quoters (no quoters...)
templateFile = "WebQuotes.xhtml" (never used, and filename non-existant)
#get the sibling file "quotes.txt" (no such "quotes.txt" file ...)
quotefile = os.path.join(os.path.split(__file__), "quotes.txt")
- clicking on "See it in action" gives error...
More information about the Twisted-Python