[Twisted-Python] Default location for templates of .rpy's
Mukhsein Johari
arashi1 at pd.jaring.my
Thu Jun 12 06:29:18 MDT 2003
Hello all,
I've been playing with twisted.web stuff and I've come across an puzzle. When
you're using web.static.File to 'serve' directories (using a custom
webserver), and there are .rpy files you want to use in the directory tree,
it seems necessary include the templateDirectory:
resource = page.Page("Hello World!", templateFile = "index.xhtml", \
templateDirectory = os.path.split(__file__)[0])
in the .rpy you use even when the template file is in the very same directory
as the .rpy file. Otherwise twisted complains about file not found. Why is
that? Isn't the same directory as the .rpy be a safe default to search first?
It just seems like making things more complicated than necessary.
More information about the Twisted-Python
mailing list