-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
43 lines (37 loc) · 1.59 KB
/
config.py
File metadata and controls
43 lines (37 loc) · 1.59 KB
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
import os
class DefaultConfig(object):
def __init__(self):
self.DEBUG = True
self.IS_PRODUCTION = False
self.BASE_DIR = os.path.abspath(os.path.dirname(__file__))
self.ROOT_PATH = os.path.dirname(os.path.abspath(__file__))
self.SECRET_KEY = "Xf9T4GQvtDsVn7tYC9VZFNUX6b8YIWmR"
self.SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://root@127.0.0.1:3306/koen'
self.DATABASE_CONNECT_OPTIONS = {}
self.SQLALCHEMY_TRACK_MODIFICATIONS = False
self.JSONSCHEMA_DIR = os.path.join(self.BASE_DIR, 'app', 'schemas')
self.REDIS_CACHE_HOST = '127.0.0.1'
self.REDIS_CACHE_PORT = 6379
self.REDIS_CACHE_PASSWORD = ''
self.REDIS_CACHE_DB_INDEX = 0
self.REDIS_CACHE_PREFIX = "koen_data"
self.TIMEZONE = 'Europe/Istanbul'
self.SITE_PATH = "http://0.0.0.0:5002"
self.API_URL = "http://127.0.0.1:5001"
self.LOG_DIR_PATH = "#"
self.ACCESS_TOKEN_EXPIRE_TIME = 4 # hour
self.UPLOAD_FOLDER = '/Users/uzeyiroztemur/Projects/web/koen/files'
self.SENDGRID_API_KEY = "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"
self.SENDGRID_FROM_EMAIL = "info@koen.com"
self.SENDGRID_CONTACT_EMAIL = ""
self.SENTRY_DSN = "#"
class ProductionConfig(DefaultConfig):
def __init__(self):
super(ProductionConfig, self).__init__()
self.DEBUG = False
self.IS_PRODUCTION = True
env = os.getenv('ENVIRONMENT', 'Development')
if env == "Development":
configuration = DefaultConfig()
else:
configuration = ProductionConfig()