Daniel,
I just verified your fix. Thank you very much for addressing it
quickly. I'll post a message in the pylons google group where I
originally asked about this issue.
Chas Emerick
Founder, Snowtide Informatics Systems
Enterprise-class PDF content extraction
[EMAIL PROTECTED]
http://snowtide.com | +1 413.519.6365
On Mar 6, 2006, at 11:11 PM, Daniel Miller wrote:
Thanks for the concise example. That's a bug. Fixed in r301: http://
kid.lesscode.org/trac/changeset/301
~ Daniel
Chas Emerick wrote:
First, thank you to everyone that has made Kid possible. We're
using Kid 0.9.
The problem we're having is that arguments are not being 'passed
through' to child templates that specify a parent layout via
py:layout. Example:
layout.kid:
---
<html xmlns:py="http://purl.org/kid/ns#">
<body>
layout template locals: ${str(dir())}
<br/>
${local_content()}
</body>
</html>
---
child.kid:
---
<html py:layout="'layout.kid'" xmlns:py="http://purl.org/kid/ns#">
<content py:def="local_content()" py:strip="True">
Child template locals: ${str(dir())}
</content>
</html>
---
Running 'kid child.kid testarg=foo' results in 'testarg' being in
the locals from the layout template, but that argument is missing
from the child template locals.
Now, it's understood that the function created by the py:def in
the child template is completely different function with its own
locals, etc, but it's pretty unintuitive that it doesn't inherit
the locals of the layout template that is calling that function.
I've poked around a little at trying to define and then call
local_content() with the layout template's locals dict (expanded
into kwargs), with little success.
We can certainly inject into the layout template what local_content
() is generating using py:match and adding an appropriate anchor
tag in the layout template. However, given the provisional nature
of py:match, being able to readily use py:def in its place would
be preferable at this time.
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting
language
that extends applications into web and mobile media. Attend the
live webcast
and join the prime developer group breaking into this new coding
territory!
http://sel.as-us.falkag.net/sel?
cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
kid-template-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kid-template-discuss
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
kid-template-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kid-template-discuss