Skip to content
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

Allow passing k/v pairs to a custom J2 template #872

Open
1 task done
vachillo opened this issue Jun 17, 2024 · 1 comment
Open
1 task done

Allow passing k/v pairs to a custom J2 template #872

vachillo opened this issue Jun 17, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@vachillo
Copy link
Member

Is your feature request related to a problem? Please describe.
I have custom J2 templates that i would like to use, but i have no way to pass custom k/v pairs without overriding the entire class

Describe the solution you'd like
I want to pass a dict to a Tool/Engine that use J2 templates that i can use to pass in k/v pairs to render to my custom template

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

@vachillo vachillo added the enhancement New feature or request label Jun 17, 2024
@collindutter
Copy link
Member

This should be implemented through the following:

  1. Add task: self to BaseTask.full_context.
  2. Add context: self.full_context as arguments to all Task uses of J2.render.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants