-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
37 lines (29 loc) · 939 Bytes
/
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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
basedir = os.path.abspath(os.path.dirname(__file__))
class Config:
SECRET_KEY = os.environ.get('SECRET_KEY') or 'jack vps on vultr'
IP_INFO_DB_KEY = os.environ.get('IPINFODBKEY') or 'key'
SQLALCHEMY_COMMIT_ON_TEARDOWN = True
SQLALCHEMY_TRACK_MODIFICATIONS = True
@staticmethod
def init_app(app):
pass
class DevConfig(Config):
DOMAIN = ''
DEBUG = True
SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(basedir, 'dev.sqlite3')
import logging
logging.getLogger('flask_cors').level = logging.DEBUG
class ProdConfig(Config):
DOMAIN = ['jack003', 'jarrekk']
DEBUG = False
# DEBUG = True
SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join('/jalpc/db', 'prod.sqlite3')
import logging
logging.getLogger('flask_cors').level = logging.DEBUG
config = {
'default': DevConfig,
'prod': ProdConfig
}