Skip to content

Commit

Permalink
Merge pull request #44 from schemen/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
schemen authored Sep 22, 2021
2 parents 40895df + 2c1bb92 commit d168be7
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 1.3.2(2021-09-22)

### Improvements
* Added Plausible Insights (Default=False)

## 1.3.1(2021-09-21)

### Improvements (So pretty!)
Expand Down
6 changes: 6 additions & 0 deletions dndtools/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
'django.contrib.sites',
'paperminis.apps.PaperminisConfig',
'widget_tweaks',
'plausible',
]

MIDDLEWARE = [
Expand Down Expand Up @@ -174,3 +175,8 @@

# Set the AUTO_FIELD globally for Django 3.2
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'

# Plausible Insights
if os.getenv('ENABLE_PLAUSIBLE', False) == "True":
PLAUSIBLE_DOMAIN = os.getenv('PLAUSIBLE_DOMAIN', 'plausible.io')
PLAUSIBLE_SCRIPT_NAME = os.getenv('PLAUSIBLE_SCRIPT_NAME', 'plausible.js')
2 changes: 1 addition & 1 deletion paperminis/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version__ = '1.3.1'
__version__ = '1.3.2'
VERSION = __version__ # synonym
7 changes: 7 additions & 0 deletions paperminis/templatetags/env.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from django.template.defaulttags import register
import os


@register.filter
def env(key):
return os.environ.get(key, None)
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ psycopg2-binary==2.8.6
gunicorn==20.1.0
https://github.com/ssbothwell/greedypacker/archive/f7219917d7b84ad59ee4ed1ab8019cccf4ca3b83.zip
requests==2.26.0
django-plausible==0.1.0
8 changes: 8 additions & 0 deletions templates/base_generic.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
{% load static %}
{% load widget_tweaks %}
{% load auth_extras %}
{% load plausible %}
{% load version %}
{% load env %}

{% block title %}<title>Monster Forge</title>{% endblock %}
<meta charset="utf-8">
Expand Down Expand Up @@ -34,6 +36,12 @@
<!-- Control Center for Light Bootstrap Dashboard: scripts for the example pages etc -->
{#<script src="{% static 'assets/js/light-bootstrap-dashboard.js' %}" type="text/javascript"></script>#}
<script src="{% static 'assets/js/light-bootstrap-dashboard.js' %}" type="text/javascript"></script>

<!-- Plausible Insight -->
{% if 'ENABLE_PLAUSIBLE'|env == 'True' %}
{% plausible site_domain='PLAUSIBLE_SITE_DOMAIN'|env %}
{% endif %}

<script>
jQuery(document).ready(function($) {
$(".clickable-row").click(function() {
Expand Down

0 comments on commit d168be7

Please sign in to comment.