Display current version in footer
This commit is contained in:
parent
1a30eec470
commit
acd8c2dd8a
3 changed files with 10 additions and 2 deletions
|
@ -1,6 +1,13 @@
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
|
||||||
|
from . import __version__
|
||||||
|
|
||||||
def feedback_link(request):
|
def feedback_link(request):
|
||||||
return {
|
return {
|
||||||
'UMAP_FEEDBACK_LINK': settings.UMAP_FEEDBACK_LINK
|
'UMAP_FEEDBACK_LINK': settings.UMAP_FEEDBACK_LINK
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def version(request):
|
||||||
|
return {
|
||||||
|
'UMAP_VERSION': __version__
|
||||||
|
}
|
||||||
|
|
|
@ -109,7 +109,8 @@ TEMPLATE_CONTEXT_PROCESSORS += (
|
||||||
'django.core.context_processors.request',
|
'django.core.context_processors.request',
|
||||||
'social.apps.django_app.context_processors.backends',
|
'social.apps.django_app.context_processors.backends',
|
||||||
'social.apps.django_app.context_processors.login_redirect',
|
'social.apps.django_app.context_processors.login_redirect',
|
||||||
'umap.context_processors.feedback_link'
|
'umap.context_processors.feedback_link',
|
||||||
|
'umap.context_processors.version',
|
||||||
)
|
)
|
||||||
|
|
||||||
TEMPLATE_LOADERS = (
|
TEMPLATE_LOADERS = (
|
||||||
|
|
|
@ -69,6 +69,6 @@
|
||||||
{% block footer %}
|
{% block footer %}
|
||||||
{{ block.super }}
|
{{ block.super }}
|
||||||
<footer>
|
<footer>
|
||||||
<a href="/">umap</a> an OpenStreetMap project
|
<a href="/">umap</a> an OpenStreetMap project (version {{ UMAP_VERSION }})
|
||||||
</footer>
|
</footer>
|
||||||
{% endblock footer %}
|
{% endblock footer %}
|
||||||
|
|
Loading…
Reference in a new issue