Forums

jinja2 var seen as literal inside w3.css

I have a jinja2 variable that is set (can see it on another page), but in my page that uses a w3.css, it shows up as a literal expression. There is an angular app further down the page, but that shouldn't interfere since it's in another section, right? Edit: nevermind. forgot I sent the file for angular instead of rendering the jinja2 template.

OK -- glad you worked out the problem!

Hmm, I think this post + the microservices one got me thinking.

Flask is very convenient with the built-in session dictionary. It's hard to say if/when I'll switch to microservices for one because I then have to take on that extra work manually. Using Flask, we can pass along some session info inside the {{ }}. However, Angular interferes with this, and at first I was thinking I'd need to set up a microservice to send JSON to Angular and deal with cookies/session/auth for every call. But maybe Flask-Triangle solves this problem.

I can send the {{ session info }} in the Flask template, then set that to an Angular variable and still use it with a notation like {{ session info | Angular }} so that Flask ignores the second thing in braces. No need to send JSON. The app is then more monolithic, for better or worse. Hmm. Edit: at least for some basic info, that seems ok.