Display current version in footer

This commit is contained in:
Yohan Boniface 2014-08-25 10:09:39 +02:00
parent 1a30eec470
commit acd8c2dd8a
3 changed files with 10 additions and 2 deletions

View file

@ -1,6 +1,13 @@
from django.conf import settings
from . import __version__
def feedback_link(request):
return {
'UMAP_FEEDBACK_LINK': settings.UMAP_FEEDBACK_LINK
}
def version(request):
return {
'UMAP_VERSION': __version__
}

View file

@ -109,7 +109,8 @@ TEMPLATE_CONTEXT_PROCESSORS += (
'django.core.context_processors.request',
'social.apps.django_app.context_processors.backends',
'social.apps.django_app.context_processors.login_redirect',
'umap.context_processors.feedback_link'
'umap.context_processors.feedback_link',
'umap.context_processors.version',
)
TEMPLATE_LOADERS = (

View file

@ -69,6 +69,6 @@
{% block footer %}
{{ block.super }}
<footer>
<a href="/">umap</a> an OpenStreetMap project
<a href="/">umap</a> an OpenStreetMap project (version {{ UMAP_VERSION }})
</footer>
{% endblock footer %}