forked from fabriziomiano/covidashit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
44 lines (32 loc) · 759 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
38
39
40
41
42
43
44
"""
Configuration
"""
import os
from dotenv import load_dotenv
load_dotenv()
class BaseConfig(object):
"""Base config class."""
REDIS_URL = os.environ.get('REDIS_URL')
MONGO_URI = os.environ.get('MONGO_URI')
SITEMAP_INCLUDE_RULES_WITHOUT_PARAMS = True
CELERY_CONFIG = {
'broker_url': REDIS_URL,
'result_backend': REDIS_URL
}
class Development(BaseConfig):
"""Development config."""
DEBUG = True
ENV = 'dev'
class Staging(BaseConfig):
"""Staging config."""
DEBUG = True
ENV = 'staging'
class Production(BaseConfig):
"""Production config"""
DEBUG = False
ENV = 'production'
config = {
'development': Development,
'staging': Staging,
'production': Production,
}