Skip to content

Add a DerivedContextReference node type#861

Merged
davidism merged 1 commit intopallets:masterfrom
OddBloke:contextreference_locals
Dec 2, 2019
Merged

Add a DerivedContextReference node type#861
davidism merged 1 commit intopallets:masterfrom
OddBloke:contextreference_locals

Conversation

@OddBloke
Copy link
Copy Markdown

@OddBloke OddBloke commented Jun 1, 2018

This allows extensions to access locals in the scope from which they were called. Fixes #860

@OddBloke
Copy link
Copy Markdown
Author

OddBloke commented Jun 1, 2018

Oh, just noticed that I should be using fields, not attributes on the ContextReference node.

@OddBloke OddBloke changed the title Add include_locals attribute to ContextReference Add a DerivedContextReference node type Jun 1, 2018
@OddBloke
Copy link
Copy Markdown
Author

Hey folks, this is blocking me from doing some Jinja extension work elsewhere, and is a fairly self-contained change. Is there anything I can do to help get some eyeballs on it?

@OddBloke OddBloke force-pushed the contextreference_locals branch from 38827bd to 8b6f6d2 Compare September 24, 2018 17:59
@OddBloke
Copy link
Copy Markdown
Author

I've rebased this on to master, so now I have a passing Travis build.

@davidism
Copy link
Copy Markdown
Member

Thanks, I'm not sure when I can get to this, but letting you know I've seen it.

@OddBloke
Copy link
Copy Markdown
Author

Thanks for letting me know!

@davidism
Copy link
Copy Markdown
Member

davidism commented Dec 2, 2019

I feel like this might get deprecated if we fix various other open issues about context. But that's a much bigger task, and this seems fine until then.

@davidism davidism force-pushed the contextreference_locals branch from 8b6f6d2 to b75c6ea Compare December 2, 2019 22:02
This allows extensions to access locals in the scope from which they
were called.
@davidism davidism force-pushed the contextreference_locals branch from b75c6ea to 1539dd4 Compare December 2, 2019 22:03
@davidism davidism merged commit 06238a9 into pallets:master Dec 2, 2019
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Nov 13, 2020
@OddBloke OddBloke deleted the contextreference_locals branch September 14, 2021 12:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable access to local variables in extensions

2 participants