add version number to gnuviechadmin

- add __version__ to gnuviechadmin/__init__.py
- change docs/conf.py to use version number from gnuviechadmin
- add gnuviechadmin.context_processors.version_info to add
  gnuviechadmin_version to template context
- add version and technology links to templates/base.html footer
- add CSS styles for footer formatting
This commit is contained in:
Jan Dittberner 2015-02-01 22:15:40 +01:00
parent 1bee80044c
commit 251e8a54f6
6 changed files with 59 additions and 6 deletions

View file

@ -1 +1,3 @@
from gnuviechadmin.celery import app as celery_app
__version__ = '0.11.0'

View file

@ -8,6 +8,8 @@ import logging
from django.conf import settings
from gnuviechadmin import __version__ as gvaversion
_LOGGER = logging.getLogger(__name__)
@ -54,3 +56,15 @@ def navigation(request):
'default active menu item %s',
viewfunc.__name__, viewmodule, context['active_item'])
return context
def version_info(request):
"""
Context processor that adds the gnuviechadmin version to the request
context.
"""
context = {
'gnuviechadmin_version': gvaversion,
}
return context

View file

@ -173,6 +173,7 @@ TEMPLATE_CONTEXT_PROCESSORS = (
'allauth.socialaccount.context_processors.socialaccount',
# custom context processors
'gnuviechadmin.context_processors.navigation',
'gnuviechadmin.context_processors.version_info',
)
# See: https://docs.djangoproject.com/en/dev/ref/settings/#template-loaders