A Jinja2 extension that adds django version to templates.
Project description
A Jinja extension that creates a global variable with Django version information for your Jinja2 templates:
Usage
$ pip install jinja2-django-version
from jinja2 import Environment
env = Environment(extensions=['jinja2_django_version.DjangoVersionExtension'])
# 2.0
template = env.from_string("{{ django_version }}")
# 2.0
template = env.from_string("{{ django_version.minor }}")
# 2
template = env.from_string("{{ django_version.major }}")
# 2.0.2
template = env.from_string("{{ django_version.micro }}")
template.render()
Project details
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
Close
Hashes for jinja2-django-version-1.1.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b216c1c6996f87ef6e906b4f396d52202f68dc7609ea01435e185d677e285326 |
|
MD5 | 1c46a4cdcef0157288e4b02a29b7533d |
|
BLAKE2b-256 | a9cb09ddbc368ad7575ce35e0d9b4a207ca626bc73ebf674a3f9568b24ab4a8b |
Close
Hashes for jinja2_django_version-1.1.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa18412e35b4279a154703372c9a862c414f6efa43017352dec3acfc2e54a61b |
|
MD5 | b82199a5694e3d7b34bd834822e3ab2f |
|
BLAKE2b-256 | d75fc6cc0456dfdc57ae671766d981036eb171a42734c5a1283a059f0779fb95 |