From 7f71bf756599843ac33b20b56a7c013bf9d5b940 Mon Sep 17 00:00:00 2001 From: Arne Schauf Date: Sun, 29 Sep 2013 03:13:04 +0200 Subject: [PATCH] piwik tracking --- nsupdate/nsupdate/context_processors.py | 4 ++++ nsupdate/nsupdate/templates/base.html | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/nsupdate/nsupdate/context_processors.py b/nsupdate/nsupdate/context_processors.py index 5e0069f..b9b9104 100644 --- a/nsupdate/nsupdate/context_processors.py +++ b/nsupdate/nsupdate/context_processors.py @@ -6,4 +6,8 @@ def add_settings(request): context = {} context['WWW_IPV4_HOST'] = settings.WWW_IPV4_HOST context['WWW_IPV6_HOST'] = settings.WWW_IPV6_HOST + try: + context['ENABLE_PIWIK_PRODUCTION'] = settings.ENABLE_PIWIK_PRODUCTION + except: + pass return context diff --git a/nsupdate/nsupdate/templates/base.html b/nsupdate/nsupdate/templates/base.html index f62b899..4e7b3c3 100644 --- a/nsupdate/nsupdate/templates/base.html +++ b/nsupdate/nsupdate/templates/base.html @@ -129,5 +129,25 @@ + {% if ENABLE_PIWIK_PRODUCTION %} + + + + {% endif %}