Flask-JSGlue
Flask-JSGlue copied to clipboard
Issue with Jinja2 > 3.0.3
Hello, With new version of Jinja2 the Python modules Markup and Escape should be imported from MarkupSafe (https://jinja.palletsprojects.com/en/3.1.x/changes/#version-3-1-1)
Actually it raise an exception :
File "/var/www/site_mbt/flask-app-v2/src/__init__.py", line 11, in <module>
from flask_jsglue import JSGlue
File "/var/www/site_mbt/flask-app-v2/venv/lib/python3.8/site-packages/flask_jsglue.py", line 2, in <module>
from jinja2 import Markup
ImportError: cannot import name 'Markup' from 'jinja2' (/var/www/site_mbt/flask-app-v2/venv/lib/python3.8/site-packages/jinja2/__init__.py)
Thank you for your great job.
Yes, I have the same problem.
You can install Flask-JSGlue2 >=0.3.3
@paulmis Does that work? I tried it but get a missing template error when trying to use it. jinja2.exceptions.TemplateNotFound: jsglue/js_bridge.js
. Looking at the pip install, I don't see where it properly installs the js_bridge.js
template file.