Skip to main content

Django reusable app to show your project version

Project description

GitHub Coveralls License Version Supported Python version Supported Django version Package format Python wheel support Package status

django-project-version is a Django reusable app to show your project version

<nav class="contents" id="contents" role="doc-toc">




  • Obtain your copy of source code from the git repository: $ git clone Or download the latest release from

  • Run $ python ./ install from the repository source tree or unpacked archive. Or use pip: $ pip install django-project-version.


  • Add "djversion" to settings.INSTALLED_APPS.





Contains project version. Defaults to None.


Contains project update date or datetime. Defaults to None.


Contains version and updated format string. Defaults to "{version} ({updated})".


Contains path to git repository from where version info can get. Defaults to None.


Indicate usage of git repository current tag as project version. Defaults to False.


Indicate usage of git repository last commit hash as project version. Defaults to False.


If you want always have "VERSION" variable in templates context, just add "djversion.context_processors.version" to settings.TEMPLATE_CONTEXT_PROCESSORS



Or you can use project_version templatetag which can be loaded from djversion_tags.

{# footer.html #}

{% load djversion_tags %}

{% project_version as VERSION %}

Also simple management command print-version which prints project version to stdout is available. Just run: $ python ./ print-version from project folder.

Advanced features

If you want to have REST-style view with your project version:

  • Install django-project-version with additional dependencies: $ pip install django-project-version[rest].

  • Extend you settings.INSTALLED_APPS by adding "rest_framework".


  • Add "djversion" to your URLs definitions:


from django.urls import re_path, include

urlpatterns += [
    re_path(r"^version/", include("djversion.urls")),

Or to use information from the project git repository as project version:

  • Install django-project-version with additional dependencies: $ pip install django-project-version[git].

  • Configure git related settings.


  1. Fork it

  2. Install GNU Make

  3. Install and configure pyenv and pyenv-virtualenv plugin

  4. Install and configure direnv

  5. Create environment config from example

cp .env.example .env
  1. Install development dependencies:

make install
  1. Create your fix/feature branch:

git checkout -b my-new-fix-or-feature
  1. Check code style and moreover:

make check
  1. Run tests:

make test
  1. Push to the branch:

git push origin my-new-fix-or-feature
  1. Create a new Pull Request


django-project-version uses the MIT license. Please check the MIT-LICENSE file for more details.


Project Website:

Author: DCOD <>

For other authors list see AUTHORS file.

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 (25.0 kB view hashes)

Uploaded source

Built Distribution

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page