-
Notifications
You must be signed in to change notification settings - Fork 309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
can't see values in 'outer' context when inside a loop #8
Comments
Argh my eyes! Sorry. I've stuck the sample code and templates etc up at |
Definitely a bug - thanks for reporting, I'll try to fix soon. |
This commit fixes the issue of nested contexts. |
The above commit has introduced a bug in which inner context propagates its data to outer context. |
Actually, it proved to be a little more complicated than that. |
I'm embarassed to say I don't know how to install this and test .... |
From source: In case you have cloned defunkt's repository, try this: |
Did you forget to commit examples/inner_context_bubbling.py? |
Oops, what I forgot was to remove the import. Since I got inner_context_bubbling.pyc file in examples directory, import was reaching the thing and tests passed. Sorry about that. Fixed; overall changes presented in this compare view. |
Doesn't seem to work (using 217efd4).
|
Indeed. Nested contexts were working only for non-looping blocks. Extended to looping ones too. |
Will be taking a look at this. Here is the test case in the zip file included in one of the first comments above: Context:
Template:
|
Added a unit test to show that the issue is no longer present: section list items do have access to the parent context.
This must have gotten fixed somewhere along the way. Seems to be fixed in master as well. |
I've got a dead simple template and data structure.
....amended original comment with inline code and templates,
as it looked godawful....
Upshot is: Ruby Mustaches seems to DTRT, Pystache doesn't. Really hope it's a pystache bug :)
The text was updated successfully, but these errors were encountered: