-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
65 lines (53 loc) · 1.75 KB
/
config.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
60
61
62
63
64
65
import os
import secrets
from socket import gethostname
if gethostname() == 'cldershem-laptop':
DEBUG = True
else:
DEBUG = False
##############
testing = True
# TESTING = False
# LOGTO = '/var/www/homelessgaffer.com/tmp/log/'
if DEBUG:
DISQUS_SHORTNAME = 'hgtesting'
else:
DISQUS_SHORTNAME = 'homelessgaffer'
# misc
BASE_DIR = os.path.abspath(os.path.dirname(__file__))
ADMINS = secrets.ADMINS
# wtforms
CSRF_ENABLED = True
SECRET_KEY = secrets.SECRET_KEY
# db
MONGODB_SETTINGS = {'DB': "homelessgaffer"}
# recaptcha
#RECAPTCHA_USE_SSL
RECAPTCHA_PUBLIC_KEY = secrets.RECAPTCHA_PUBLIC_KEY
RECAPTCHA_PRIVATE_KEY = secrets.RECAPTCHA_PRIVATE_KEY
RECAPTCHA_OPTIONS = {'theme': 'white'}
# flask debug toolbar
DEBUG_TB_PANELS = [
'flask_debugtoolbar.panels.versions.VersionDebugPanel',
'flask_debugtoolbar.panels.timer.TimerDebugPanel',
'flask_debugtoolbar.panels.headers.HeaderDebugPanel',
'flask_debugtoolbar.panels.request_vars.RequestVarsDebugPanel',
'flask_debugtoolbar.panels.template.TemplateDebugPanel',
#'flask_debugtoolbar.panels.sqlalchemy.SQLAlchemyDebugPanel',
'flask_debugtoolbar.panels.logger.LoggingPanel',
'flask_debugtoolbar.panels.profiler.ProfilerDebugPanel',
'flask_debugtoolbar_mongo.panel.MongoDebugPanel',
]
DEBUG_TB_INTERCEPT_REDIRECTS = False
# mail server settings
MAIL_SERVER = 'smtp.googlemail.com'
MAIL_PORT = 465
MAIL_USE_TLS = False
MAIL_USE_SSL = True
MAIL_USERNAME = secrets.MAIL_USERNAME
MAIL_PASSWORD = secrets.MAIL_PASSWORD
# oauth keys
FACEBOOK_CONSUMER_KEY = secrets.SOCIAL_FACEBOOK['consumer_key']
FACEBOOK_CONSUMER_SECRET = secrets.SOCIAL_FACEBOOK['consumer_secret']
GOOGLE_CONSUMER_KEY = secrets.SOCIAL_GOOGLE['consumer_key']
GOOGLE_CONSUMER_SECRET = secrets.SOCIAL_GOOGLE['consumer_secret']