diff options
author | Stephen Finucane <stephen@that.guru> | 2016-11-19 18:31:34 +0000 |
---|---|---|
committer | Stephen Finucane <stephen@that.guru> | 2017-03-01 22:11:05 +0000 |
commit | 7b07b71e9551a303f4837aaa6e5bbefa3d56d139 (patch) | |
tree | 4f657ff63cca5989cda892bea236a3b1341d909e /patchwork/context_processors.py | |
parent | 0ffc8ab3583944bd7ba8690c97429b22be7e4492 (diff) | |
download | patchwork-7b07b71e9551a303f4837aaa6e5bbefa3d56d139.tar patchwork-7b07b71e9551a303f4837aaa6e5bbefa3d56d139.tar.gz |
templates: Add Patchwork version
This is managed using a combination of hardcoded string, for
installations from tarball, and 'git describe', for installations from
a Git repo.
This includes installing Git in the Docker environment, to enable this
in the development environment.
Signed-off-by: Stephen Finucane <stephen@that.guru>
Acked-by: Daniel Axtens <dja@axtens.net>
Diffstat (limited to 'patchwork/context_processors.py')
-rw-r--r-- | patchwork/context_processors.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/patchwork/context_processors.py b/patchwork/context_processors.py index 8f1de9e..b021b31 100644 --- a/patchwork/context_processors.py +++ b/patchwork/context_processors.py @@ -19,6 +19,12 @@ from django.contrib.sites.models import Site +import patchwork + def site(request): return {'site': Site.objects.get_current()} + + +def version(request): + return {'version': patchwork.__version__} |