-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
30 lines (22 loc) · 678 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
import os
basedir = os.path.abspath(os.path.dirname(__file__))
class Config(object):
DEBUG = True
HOST = "0.0.0.0"
PORT = 8588
CSRF_ENABLED = True
SECRET_KEY = os.urandom(64)
CELERY_RESULT_BACKEND = "rpc://"
CELERY_BROKER_URL = "redis://localhost:6379/0"
SQLALCHEMY_TRACK_MODIFICATIONS = False
class ProductionConfig(Config):
DEBUG = False
SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL')
class DevelopmentConfig(Config):
ENV = "development"
DEBUG = True
SQLALCHEMY_DATABASE_URI = "sqlite:///" + basedir + "/db.sqlite3"
config = {
"production": ProductionConfig(),
"development": DevelopmentConfig()
}