askama
askama copied to clipboard
is it possible to use imports with filters, or make the import an expression?
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!
No, that's not currently possible, and I don't think it would be trivial to do.