Thanks to visit codestin.com
Credit goes to github.com

Skip to content

A Jinja extension that creates a global variable with Django version information for your Jinja2 templates.

License

Notifications You must be signed in to change notification settings

jmfederico/jinja2-django-version

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔔 PROJECT STATUS 🔔

Life has taken me to now work in GO, and do not have the time to actively maintain this project.

Which means this project is looking for new maintainer, please open an issue and postulate yourself if interested.

Jinja2 Django Version

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()

About

A Jinja extension that creates a global variable with Django version information for your Jinja2 templates.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages