A Jinja2 extenstion that adds django version to templates.
Project description
A Jinja extenstion 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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8cdd893cd62bf759f0999069948c8d88f8e0e3c9eda47de9e065b5ed6ef21dac |
|
MD5 | cc5401be66711862f7429664c0e2d456 |
|
BLAKE2b-256 | 2ef43b1c831b06e1a25f08a74f868183d06a9c56681e9277aa65a1a96a1b8061 |
Close
Hashes for jinja2_django_version-1.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ebb7600d1e014c71c9b1c4ff2babcf83188438b763044f63fb719c3d070df5e4 |
|
MD5 | ca69dd5cb720e0be98eb3c6ab2df9112 |
|
BLAKE2b-256 | f592cacbca4db2b134bd292fcf3b11368b8039662690d79edea2e35fb99bd6ba |