This commit is contained in:
Eugene Pankov
2021-07-16 20:25:00 +02:00
parent 6d4ae3b4c3
commit 2c95a15609
18 changed files with 379 additions and 137 deletions

View File

@@ -46,6 +46,7 @@ MIDDLEWARE = [
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'tabby.middleware.GAMiddleware',
]
ROOT_URLCONF = 'tabby.urls'
@@ -184,6 +185,8 @@ for key in [
'GITHUB_SPONSORS_MIN_PAYMENT',
'GITHUB_TOKEN',
'ENABLE_LOGIN',
'GA_ID',
'GA_DOMAIN',
]:
globals()[key] = os.getenv(key)
@@ -197,7 +200,7 @@ for key in [
for key in [
'ENABLE_LOGIN',
]:
globals()[key] = int(globals()[key]) if globals()[key] else None
globals()[key] = bool(globals()[key]) if globals()[key] else None
for key in [