diff --git a/apps/client/__init__.py b/apps/client/__init__.py index cfb007c..da04cc3 100644 --- a/apps/client/__init__.py +++ b/apps/client/__init__.py @@ -1 +1 @@ -__version__ = '2.1.5' +__version__ = '2.1.6' diff --git a/apps/client/context_processors.py b/apps/client/context_processors.py index 84d5745..d758eed 100644 --- a/apps/client/context_processors.py +++ b/apps/client/context_processors.py @@ -8,8 +8,11 @@ def settings(request): - return {'brand': site_settings.BRAND, - 'sso_base_url': site_settings.OPENID_SSO_SERVER_BASE_URL, - 'app_name': site_settings.SSO['APP_NAME'], - 'version': __version__ - } + return { + 'enable_plausible': site_settings.ENABLE_PLAUSIBLE, + 'domain': site_settings.DOMAIN, + 'brand': site_settings.BRAND, + 'sso_base_url': site_settings.OPENID_SSO_SERVER_BASE_URL, + 'app_name': site_settings.SSO['APP_NAME'], + 'version': __version__ + } diff --git a/apps/client/settings.py b/apps/client/settings.py index b7d0b5e..e745886 100644 --- a/apps/client/settings.py +++ b/apps/client/settings.py @@ -24,6 +24,9 @@ if DEBUG: EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' +DOMAIN = os.getenv('DOMAIN', "localhost:8000") +ENABLE_PLAUSIBLE = os.getenv('ENABLE_PLAUSIBLE', 'False').lower() in ('true', '1', 't') + ALWAYS_REFRESH_TOKENS = os.getenv('ALWAYS_REFRESH_TOKENS', 'False').lower() in ('true', 'yes', '1') REQUESTS_LOG_LEVEL = os.getenv('REQUESTS_LOG_LEVEL', 'INFO') diff --git a/apps/client/templates/base.html b/apps/client/templates/base.html index 3af2674..b60d04d 100644 --- a/apps/client/templates/base.html +++ b/apps/client/templates/base.html @@ -21,6 +21,9 @@ {% endblock script %} + {% if enable_plausible %} + + {% endif %} {% block extrascript %}{% endblock extrascript %} diff --git a/set-version.sh b/set-version.sh index 2a95f48..140d2ec 100755 --- a/set-version.sh +++ b/set-version.sh @@ -1,5 +1,5 @@ #!/bin/bash -VERSION=2.1.5 +VERSION=2.1.6 sed -i "s/__version__ =.*/__version__ = '${VERSION}'/" apps/client/__init__.py