unify string chars
This commit is contained in:
+11
-8
@@ -15,10 +15,13 @@ import sentry_sdk
|
|||||||
from sentry_sdk.integrations.django import DjangoIntegration
|
from sentry_sdk.integrations.django import DjangoIntegration
|
||||||
from sikweb.base import *
|
from sikweb.base import *
|
||||||
|
|
||||||
|
SENTRY_DSN = os.getenv('SENTRY_DSN', '')
|
||||||
|
DEPLOY_ENV = os.getenv('DEPLOY_ENV', 'production')
|
||||||
|
|
||||||
# Setup sentry
|
# Setup sentry
|
||||||
sentry_sdk.init(
|
sentry_sdk.init(
|
||||||
dsn=os.getenv("SENTRY_DSN", ""),
|
dsn=SENTRY_DSN,
|
||||||
environment=os.getenv("DEPLOY_ENV", "production"),
|
environment=DEPLOY_ENV,
|
||||||
integrations=[DjangoIntegration()],
|
integrations=[DjangoIntegration()],
|
||||||
|
|
||||||
# Set traces_sample_rate to 1.0 to capture 100%
|
# Set traces_sample_rate to 1.0 to capture 100%
|
||||||
@@ -34,11 +37,11 @@ sentry_sdk.init(
|
|||||||
# SECURITY WARNING: don't run with debug turned on in production!
|
# SECURITY WARNING: don't run with debug turned on in production!
|
||||||
DEBUG = os.getenv('DEBUG', False) == 'True'
|
DEBUG = os.getenv('DEBUG', False) == 'True'
|
||||||
|
|
||||||
URL = os.getenv("HOST", "api.sahkoinsinoorikilta.fi")
|
URL = os.getenv('HOST', 'api.sahkoinsinoorikilta.fi')
|
||||||
FRONTEND_URL = os.getenv("FRONTEND_URL", "sahkoinsinoorikilta.fi")
|
FRONTEND_URL = os.getenv('FRONTEND_URL', 'sahkoinsinoorikilta.fi')
|
||||||
ALLOWED_HOSTS = ["localhost", "127.0.0.1", FRONTEND_URL, URL]
|
ALLOWED_HOSTS = ['localhost', '127.0.0.1', FRONTEND_URL, URL]
|
||||||
if DEBUG:
|
if DEBUG:
|
||||||
ALLOWED_HOSTS = ["*"]
|
ALLOWED_HOSTS = ['*']
|
||||||
|
|
||||||
USE_X_FORWARDED_HOST = True
|
USE_X_FORWARDED_HOST = True
|
||||||
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
|
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
|
||||||
@@ -48,8 +51,8 @@ SECRET_KEY = os.getenv('SECRET_KEY', '7p$85^4ibb^p4-=vs44b7!y0e-zemugze18@a#30&7
|
|||||||
|
|
||||||
# ReCaptcha
|
# ReCaptcha
|
||||||
# http://www.yaconiello.com/blog/integrating-google-recaptcha-to-django/
|
# http://www.yaconiello.com/blog/integrating-google-recaptcha-to-django/
|
||||||
GOOGLE_RECAPTCHA_SITE_KEY = os.getenv("GOOGLE_RECAPTCHA_SITE_KEY", "YOUR-PUBLIC-KEY")
|
GOOGLE_RECAPTCHA_SITE_KEY = os.getenv('GOOGLE_RECAPTCHA_SITE_KEY', 'YOUR-PUBLIC-KEY')
|
||||||
GOOGLE_RECAPTCHA_SECRET_KEY = os.getenv("GOOGLE_RECAPTCHA_SECRET_KEY", "YOUR-PRIVATE-KEY")
|
GOOGLE_RECAPTCHA_SECRET_KEY = os.getenv('GOOGLE_RECAPTCHA_SECRET_KEY', 'YOUR-PRIVATE-KEY')
|
||||||
|
|
||||||
# Email settings (more settings in base.py)
|
# Email settings (more settings in base.py)
|
||||||
EMAIL_API_KEY = os.getenv('EMAIL_API_KEY', '')
|
EMAIL_API_KEY = os.getenv('EMAIL_API_KEY', '')
|
||||||
|
|||||||
Reference in New Issue
Block a user