diff --git a/tests/tests.py b/tests/tests.py index 7027fd7e7459a261fc0d62629ad9a67ebda1f80a..61adab61c452e68028351642861c13f79749f592 100644 --- a/tests/tests.py +++ b/tests/tests.py @@ -3,6 +3,7 @@ from __future__ import unicode_literals from django.test import Client, TestCase from django.utils import six + class Tuc2014TestCase(TestCase): CONTENT_BLOCK = '
CONTENT_BLOCK
' @@ -12,4 +13,5 @@ class Tuc2014TestCase(TestCase): def test_index(self): response = self.client.get('/') self.assertEquals(response.status_code, 200) - self.assertTrue(self.CONTENT_BLOCK in six.text_type(response.content)) \ No newline at end of file + + self.assertTrue(self.CONTENT_BLOCK in six.text_type(response.content, "utf-8")) diff --git a/tuc2014/context_processors.py b/tuc2014/context_processors.py index f87820d341eafd6a4e1052ddabae9742afa13d43..5bdb0ddb00946c9235dbdf53849769670da4cf39 100644 --- a/tuc2014/context_processors.py +++ b/tuc2014/context_processors.py @@ -10,11 +10,7 @@ except ImportError: def tucal(request): - try: - bootstrap_left, bootstrap_right = getattr(settings, 'TUCAL_BOOTSTRAP_COLUMNS', (4, 8)) - except: - bootstrap_left, bootstrap_right = (4, 8) - + language_uri = getattr(settings, 'TUCAL_LANGUAGE_SELECT', '') if not language_uri: try: @@ -22,17 +18,20 @@ def tucal(request): language_uri = reverse('tuc2014:change_language') except: language_uri = '' - + + today = datetime.date.today() + return { - 'tucal_haupttitel': getattr(settings, 'TUCAL_HAUPTTITEL', ''), 'tucal_autor': getattr(settings, 'TUCAL_AUTOR', 'Webmaster'), + 'tucal_haupttitel': getattr(settings, 'TUCAL_HAUPTTITEL', ''), 'tucal_impressum': getattr(settings, 'TUCAL_IMPRESSUM', '//www.tu-chemnitz.de/tu/impressum.html'), - 'tucal_year': "{}".format(datetime.date.today().year), + 'tucal_keywords': getattr(settings, 'TUCAL_KEYWORDS', ''), 'tucal_language_uri': language_uri, - #default hash: webmaster@ - 'tucal_mailhash': getattr(settings, 'TUCAL_MAIL_HASH', '1-d2VibWFzdGVyQA=='), - 'tucal_bootstrap_left': bootstrap_left, - 'tucal_bootstrap_right': bootstrap_right + 'tucal_last_modified': today, + 'tucal_logos': getattr(settings, 'TUCAL_LOGOS', []), + 'tucal_titel': getattr(settings, 'TUCAL_TITEL', ''), + 'tucal_url': request.build_absolute_uri(), + 'tucal_year': "{}".format(today.year), } diff --git a/tuc2014/templates/tuc2014/base.html b/tuc2014/templates/tuc2014/base.html index 0228fa38d461615f54d89293f23649d1ca8e5892..2bb1a587c33ef159f1a9b6e6c0687b669aee8c2a 100644 --- a/tuc2014/templates/tuc2014/base.html +++ b/tuc2014/templates/tuc2014/base.html @@ -2,29 +2,28 @@ {% block tucal_title %}{% if tucal_titel %}{{tucal_titel}}{% else %}{{tucal_haupttitel}}{% endif %} | TU Chemnitz{% endblock %} - - - - - - - - - + + + + + + + + + - - - - - - - + + + + + + - {% block extrahead %}{% endblock extrahead %}
-

Navigation

- - +
- {{tucal_haupttitel}}
- {{tucal_haupttitel}} + {{tucal_haupttitel}}
+ {{tucal_titel}}
- -