Merge branch 'release/0.11.1' into production

* release/0.11.1:
  bump version number, add release to changelog
  add version number to gnuviechadmin
  enable translations for contact form
This commit is contained in:
Jan Dittberner 2015-02-01 22:19:45 +01:00
commit bedd48dedc
8 changed files with 65 additions and 7 deletions

View file

@ -1,6 +1,10 @@
Changelog
=========
* :release:`0.11.1 <2015-02-01>`
* :bug:`-` fix translation of contact form by using ugettext_lazy and adding
contact_form to INSTALLED_APPS
* :release:`0.11.0 <2015-02-01>`
* :feature:`-` add icons to top level navigation
* :feature:`-` add contact form

View file

@ -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.

View file

@ -10,7 +10,7 @@ from django.core.mail import send_mail
from django.core.urlresolvers import reverse
from django.template import RequestContext
from django.template import loader
from django.utils.translation import ugettext as _
from django.utils.translation import ugettext_lazy as _
from django.contrib.sites.models import RequestSite
from django.contrib.sites.models import Site

View file

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

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
@ -270,6 +271,7 @@ LOCAL_APPS = (
'userdbs',
'hostingpackages',
'websites',
'contact_form',
)
# See: https://docs.djangoproject.com/en/dev/ref/settings/#installed-apps

View file

@ -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;
}

View file

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