-
Notifications
You must be signed in to change notification settings - Fork 21
/
__init__.py
59 lines (47 loc) · 1.34 KB
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
from logtacts.settings import *
import dj_database_url
DEBUG = False
TEMPLATE_DEBUG = DEBUG
DATABASES['default'] = dj_database_url.parse(get_env_variable('DATABASE_URL'))
SECRET_KEY = get_env_variable("LOGTACTS_SECRET_KEY")
ALLOWED_HOSTS = [
'localhost',
'127.0.0.1',
'.pebble.ink',
'.logtacts.com',
'.contactotter.com',
'.herokuapp.com',
]
RAVEN_CONFIG = {
'dsn': get_env_variable('SENTRY_URL'),
}
try:
RAVEN_CONFIG['release'] = raven.fetch_git_sha(os.path.dirname(os.path.dirname(__file__)))
except:
pass
# SECURE_SSL_REDIRECT = True
SECURE_HSTS_SECONDS = 3600
SECURE_FRAME_DENY = True
SECURE_CONTENT_TYPE_NOSNIFF = True
SECURE_BROWSER_XSS_FILTER = True
SESSION_COOKIE_SECURE = True
SESSION_COOKIE_HTTPONLY = True
INSTALLED_APPS += (
'gunicorn',
'opbeat.contrib.django',
)
HAYSTACK_CONNECTIONS = {
'default': {
'ENGINE': 'haystack.backends.elasticsearch_backend.ElasticsearchSearchEngine',
'URL': get_env_variable('BONSAI_URL'),
'INDEX_NAME': get_env_variable('SEARCH_INDEX'),
},
}
OPBEAT = {
'ORGANIZATION_ID': get_env_variable("OPBEAT_ORG_ID"),
'APP_ID': get_env_variable("OPBEAT_APP_ID"),
'SECRET_TOKEN': get_env_variable("OPBEAT_SECRET_KEY"),
}
ACCOUNT_DEFAULT_HTTP_PROTOCOL = "https"
DEFAULT_HTTP_PROTOCOL = "https"
ENVIRONMENT = get_env_variable('ENVIRONMENT')