Display Plinth version in Documentation / About

Users should see which Plinth version they use to make it easier to report
and reproduce bugs
This commit is contained in:
fonfon 2015-02-02 14:46:01 +01:00 committed by Sunil Mohan Adapa
parent ef2bf32668
commit 38ec7666ed
2 changed files with 10 additions and 3 deletions

View File

@ -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):

View File

@ -42,6 +42,10 @@ transition from existing services.</p>
href="http://wiki.debian.org/FreedomBox" target="_blank">Learn more
&raquo;</a></p>
<p style='margin-top:30px'>
You are running Plinth version {{ version }}.
</p>
{% endblock %}
{% block sidebar %}