/django-git-version

django templatetag library for displaying git version info

Primary LanguagePython

django-git-version

A simple django app that uses gitpython to provide templatetag(s) to display git version info from the current repo.

Installation

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'
    ...
)

Usage

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