On Thu, Aug 22, 2013 at 11:56:11AM -0700, András JÁKÓ wrote: > > > > IIRC Mako absolute template paths are actually relative to > > mako.directories. > > (Whereas relative template paths are relative to the location of the > > current template.) > > > > > Thanks! Yes, that's what I saw in Mako's TemplateLookup. As far as I > understand TemplateLookup.get_template strips the leading slash and then > tries to append it to every directory in mako.directories. (OTOH Mako's > Template works with absolute pathnames.) > > I can live with that. But then someone please update the Pyramid > documentation at > http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/templates.html#using-templates-directlyto > reflect that behaviour. Obviously "... absolute, starting with a slash > on UNIX or a drive letter prefix on Windows" means absolute pathname in the > operating system's sense, not Mako's sense that you mentioned above.
Sounds good. Would you care to suggest the updated phrasing?
And now I'm curious to find out what would happen if I actually used a
Windows drive letter prefix. How would the code even distinguish it
from an asset specification?
Marius Gedminas
--
The only way to learn a new programming language is by writing programs in it.
-- Brian Kernighan
signature.asc
Description: Digital signature
