Escape curly braces in jinja template for use in JS frameworks
Project description
flask_escapejstv
Flask extension which provides a filter to escape "curly" braces {{ }}
in Jinja templates for use in JavaScript frameworks as few Javascript frameworks use "curly" braces to display the value of an expression or variable.
Installing
Install and update using pip :
pip install Flask-EscapeJSe
To enable this filter in your flask app, register this extension.
from flask_escapejse import EscapeJSe
EscapeJSe(app)
Like other Flask extensions, you can register it lazily:
ejse = EscapeJSe()
def create_app():
app = Flask(__name__)
ejse.init_app(app)
Usage
{{ "js_variable_name"|jse }}
For more information on jinja filters, visit http://jinja.pocoo.org/docs/2.10/templates/#filters
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file Flask-EscapeJSe-0.1.0.tar.gz
.
File metadata
- Download URL: Flask-EscapeJSe-0.1.0.tar.gz
- Upload date:
- Size: 2.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.4.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3cd7b99bcc407ddd7f4cca4b2c4745d310d8609c66489b6e9df9ef04aee22386 |
|
MD5 | 5985b4f3c50e5bb6670c7a43e86f6a64 |
|
BLAKE2b-256 | 1ed8f3dff51cee5cde8fb1f111d0e903646108908442828f4ba29b95ab50c12b |
File details
Details for the file Flask_EscapeJSe-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: Flask_EscapeJSe-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.4.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e64aa8664e8bf9f7d737aa2460eb7fa85a820b10be3734a241ff7ab851d6fbe |
|
MD5 | 5a9efa03dc3b961c108a2ffc02ecbec3 |
|
BLAKE2b-256 | c2159f87399b29b7c4cea03d2fa6fe7d53b2c0de5d19b3e15af385823fdfa285 |