This project has been archived by its maintainers, and is no longer receiving any updates.
Overview
This extension to jinja makes it possible to use a haml-ish syntax for your jinja templates. It is implemented as a preprocessor and so it runs only the first time your template is parsed. So it will not affect the performance of your templates except for the first run.
Forked from Pitmairen/hamlish-jinja
Usage
Install
You can install the latest version with pip
pip install git+https://git.barkshark.xyz/barkshark/hamlish-jinja
or
pip install jinja2-haml
Basic Usage
To use this extension you just need to add it to you jinja environment and use “.haml”, “.jhaml”, or “.jaml” as an extension for your templates.
from jinja2 import Environment
from hamlish_jinja import HamlishExtension
env = Environment(extensions = [HamlishExtension])
Environment
Added in version 0.2.0
The environment gets extended with a new method hamlish_from_string which works the same as the standard env.from_string method, but renders the template with the hamlish preprocessor.
tpl = '''
%div
%p
test
'''
env.hamlish_from_string(tpl).render()
Metadata
Release files for Jinja2-Haml 0.3.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| Jinja2-Haml-0.3.5.tar.gz | 20.6 kB | Without provenance | Details for Jinja2-Haml-0.3.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| Jinja2_Haml-0.3.5-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for Jinja2_Haml-0.3.5-py2.py3-none-any.whl |
Total release size: 37.1 kB
Release files / Jinja2-Haml-0.3.5.tar.gz
| Download URL | Jinja2-Haml-0.3.5.tar.gz |
|---|---|
| Size | 20.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c4aa29cef0d67146fedb3be145aad79746ef8957363d434efe4cebfca78d373e
|
|
BLAKE2b-256 checksum How to use checksums |
fb92e86160db90a7bd085ec80057733f4c5f68899c273ffb40176fd6d6709cfe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|
Release files / Jinja2_Haml-0.3.5-py2.py3-none-any.whl
| Download URL | Jinja2_Haml-0.3.5-py2.py3-none-any.whl |
|---|---|
| Size | 16.5 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
81bba88d1aeb63f0016b972a6b031b97b501e09594c5585ad71cb834c1f70552
|
|
BLAKE2b-256 checksum How to use checksums |
adda999785dc51cdf13f2c22e224a0958c2adc4d1bcbbb3f03898e0f008316cb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|
Security for Jinja2-Haml 0.3.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.