-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
54 lines (41 loc) · 1.76 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
import os
from dotenv import load_dotenv
basedir = os.path.abspath(os.path.dirname(__file__))
load_dotenv(os.path.join(basedir,'.env'))
###############################################
#############Configuration for all Stage#######
###############################################
class Config(object):
DEBUG=False
SECRET_KEY = os.environ.get("SECRET_KEY")
MAIL_SERVER = os.environ.get("MAIL_SERVER")
MAIL_PORT = 465
MAIL_USE_TLS = False
MAIL_USE_SSL = True
MAIL_USERNAME = os.environ.get("MAIL_USERNAME")
MAIL_PASSWORD = os.environ.get("MAIL_PASSWORD")
MAIL_DEFAULT_SENDER = os.environ.get("MAIL_DEFAULT_SENDER")
AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID")
AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY")
GOOGLE_API_KEY = os.environ.get("GOOGLE_API_KEY")
ADMIN_NAME = os.environ.get("ADMIN_NAME")
GOOGLE_MAP_API = os.environ.get("GOOGLE_MAP_API")
RECAPTCHA_PUBLIC_KEY = os.environ.get("RECAPTCHA_PUBLIC_KEY")
RECAPTCHA_PRIVATE_KEY = os.environ.get("RECAPTCHA_PRIVATE_KEY")
RECAPTCHA_USE_SSL = False
#############Configuration for Development##################
class DevelopmentConfig(Config):
DEVELOPMENT = False
DEBUG = True
SQLALCHEMY_DATABASE_URI = 'sqlite:///'+os.path.join(basedir,'data.sqlite')
AWS_BUCKET = os.environ.get("AWS_BUCKET")
#############Configuration for Staging##################
class StagingConfig(Config):
DEBUG = False
SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL')
AWS_BUCKET = os.environ.get("AWS_BUCKET")
#############Configuration for Production##################
class ProductionConfig(Config):
DEBUG = False
AWS_BUCKET = os.environ.get("AWS_BUCKET_PRODUCTION")
SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL')