Skip to content

Commit

Permalink
plausible conf
Browse files Browse the repository at this point in the history
  • Loading branch information
g10f committed Mar 25, 2024
1 parent 7978daf commit e86fc4c
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion apps/client/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '2.1.5'
__version__ = '2.1.6'
13 changes: 8 additions & 5 deletions apps/client/context_processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__
}
3 changes: 3 additions & 0 deletions apps/client/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
3 changes: 3 additions & 0 deletions apps/client/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
<script src="{% static "js/script.js" %}"></script>
<script src="{% static 'js/theme.js' %}"></script>
{% endblock script %}
{% if enable_plausible %}
<script defer data-domain="{{ domain }}" src="/js/plausible-script.js"></script>
{% endif %}
{% block extrascript %}{% endblock extrascript %}
</head>
<body>
Expand Down
2 changes: 1 addition & 1 deletion set-version.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
VERSION=2.1.5
VERSION=2.1.6

sed -i "s/__version__ =.*/__version__ = '${VERSION}'/" apps/client/__init__.py

0 comments on commit e86fc4c

Please sign in to comment.