Skip to content

Latest commit

 

History

History
39 lines (27 loc) · 625 Bytes

README.md

File metadata and controls

39 lines (27 loc) · 625 Bytes

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