A simple django app that uses gitpython to provide templatetag(s) to display git version info from the current repo.
First, install this package using pip
$ pip install django-git-version
then add git_version
to INSTALLED_APPS
in your Django settings.py
:
INSTALLED_APPS = (
...
'git_version'
...
)
Load the templatetag with
{% load git_tags %}
and then use one of
{% current_commit_short '.' %}
{% current_commit '.' %}
Where '.'
is the path to the git repo