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:
parent
1bee80044c
commit
251e8a54f6
6 changed files with 59 additions and 6 deletions
|
@ -59,10 +59,11 @@ copyright = u'2014, 2015 Jan Dittberner'
|
|||
# |version| and |release|, also used in various other places throughout the
|
||||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
version = '0.11'
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = '0.11.0'
|
||||
from gnuviechadmin import __version__ as release
|
||||
|
||||
# The short X.Y version.
|
||||
version = ".".join(release.split('.')[:2])
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
|
|
|
@ -1 +1,3 @@
|
|||
from gnuviechadmin.celery import app as celery_app
|
||||
|
||||
__version__ = '0.11.0'
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -8,3 +8,18 @@ table thead th.status-column {
|
|||
table thead th.name-column {
|
||||
width: 15em;
|
||||
}
|
||||
|
||||
.gva-body {
|
||||
padding-bottom: 40px;
|
||||
}
|
||||
.gva-footer {
|
||||
text-align: center;
|
||||
padding-top: 40px;
|
||||
padding-bottom: 40px;
|
||||
border-top: 1px solid #e5e5e5;
|
||||
}
|
||||
|
||||
.gva-footer-links li {
|
||||
display: inline;
|
||||
padding: 0px 2px;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{% load staticfiles i18n account %}
|
||||
<!DOCTYPE html>
|
||||
{% load staticfiles i18n account %}<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
@ -92,7 +91,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<div class="container gva-body">
|
||||
|
||||
<h1>{% block page_title %}Example Base Template{% endblock page_title %}</h1>
|
||||
|
||||
|
@ -111,6 +110,27 @@
|
|||
|
||||
</div> <!-- /container -->
|
||||
|
||||
<footer class="gva-footer" role="contentinfo">
|
||||
<div class="container">
|
||||
<ul class="gva-footer-links text-muted">
|
||||
<li>gnuviechadmin {{ gnuviechadmin_version }}</li>
|
||||
<li>·</li>
|
||||
<li>built with:</li>
|
||||
<li><a href="https://www.python.org/"><i class="icon-python"></i> Python</a></li>
|
||||
<li>·</li>
|
||||
<li><a href="https://www.djangoproject.com/">Django</a></li>
|
||||
<li>·</li>
|
||||
<li><a href="http://www.postgresql.org/"><i class="icon-postgres"></i> PostgreSQL</a></li>
|
||||
<li>·</li>
|
||||
<li><a href="http://getbootstrap.com/">Bootstrap</a></li>
|
||||
<li>·</li>
|
||||
<li><a href="http://fontawesome.io/"><i class="fa fa-flag"></i> Font Awesome</a></li>
|
||||
<li>·</li>
|
||||
<li><a href="http://mfizz.com/oss/font-mfizz"><i class="icon-mfizz"></i> Font Mfizz</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<!-- Le javascript
|
||||
================================================== -->
|
||||
<!-- Placed at the end of the document so the pages load faster -->
|
||||
|
|
Loading…
Reference in a new issue