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

is it possible to use imports with filters, or make the import an expression? #899

Open
rivasdiaz opened this issue Nov 4, 2023 · 1 comment

Comments

@rivasdiaz
Copy link

Hi, I'm trying to use askama to generate YAML files, and I was trying to import a common part of YAML file into multiple templates. That works fine using the import statement, but the problem is they need to be indented in different positions. I was trying to use the indent filter, but I couldn't make it work with an import statement. I wonder if it would be possible to use an import as an expression so we could apply filters to it.

Thanks!

@djc
Copy link
Owner

djc commented Nov 6, 2023

No, that's not currently possible, and I don't think it would be trivial to do.

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

No branches or pull requests

2 participants