From 38ec7666ed12e0ba84b958117f0e01e3e1b8a083 Mon Sep 17 00:00:00 2001
From: fonfon
Date: Mon, 2 Feb 2015 14:46:01 +0100
Subject: [PATCH] Display Plinth version in Documentation / About
Users should see which Plinth version they use to make it easier to report
and reproduce bugs
---
plinth/modules/help/help.py | 9 ++++++---
plinth/modules/help/templates/help_about.html | 4 ++++
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/plinth/modules/help/help.py b/plinth/modules/help/help.py
index 49279a858..8d843a050 100644
--- a/plinth/modules/help/help.py
+++ b/plinth/modules/help/help.py
@@ -20,7 +20,7 @@ from gettext import gettext as _
from django.http import Http404
from django.template.response import TemplateResponse
-from plinth import cfg
+from plinth import cfg, __version__
def init():
@@ -46,8 +46,11 @@ def index(request):
def about(request):
"""Serve the about page"""
- title = _('About the {box_name}').format(box_name=cfg.box_name)
- return TemplateResponse(request, 'help_about.html', {'title': title})
+ context = {
+ 'title': _('About the {box_name}').format(box_name=cfg.box_name),
+ 'version': __version__
+ }
+ return TemplateResponse(request, 'help_about.html', context)
def helppage(request, page):
diff --git a/plinth/modules/help/templates/help_about.html b/plinth/modules/help/templates/help_about.html
index 2e05289da..af577a2fb 100644
--- a/plinth/modules/help/templates/help_about.html
+++ b/plinth/modules/help/templates/help_about.html
@@ -42,6 +42,10 @@ transition from existing services.
href="http://wiki.debian.org/FreedomBox" target="_blank">Learn more
»
+
+ You are running Plinth version {{ version }}.
+
+
{% endblock %}
{% block sidebar %}