Is there anyway to use Jinja2 if the template file has {{ in it that doesn't get replaced? Trying to use a Nuke file as a template and there are native (non-replacement) "{{" all over the place.


I guess I can do it with {% raw %}. Is there a better way though?

· · Web · 1 · 0 · 0

@anthony maybe escaping them before passing them on to Jinja would be the ideal solution?

@Wraptile I stumbled on that and gave it a whirl but the problem is the app, Nuke, didn't like the extra escaping so then I'd need to delete them after I filled in the template. In the end, I just went back to string replace. Not elegant but it works fine for now and its fast enough.

Sign in to participate in the conversation

DA-AM's Mastodon Server