-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
26 lines (22 loc) · 1.03 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
from distutils.debug import DEBUG
import os
from sqlalchemy import true
basedir = os.path.abspath(os.path.dirname(__file__))
class Config():
ENVIRONMENT = os.environ.get('environment')
SECRET_KEY = os.environ.get('SECRET_KEY','sjskfdojg&*&(9')
UPLOAD_FOLDER = os.environ.get('UPLOAD_FOLDER')
FLASK_ADMIN_SWATCH='cerulean'
PROJECT_UPLOAD_FOLDER = os.environ.get('PROJECT_UPLOAD_FOLDER')
ADI_BOT_URL = os.environ.get('ADI_BOT_ENDPOINT')
CONNECTION_URL = 'mongodb+srv://'+os.environ.get('ADI_BOT_USERNAME')+':'+os.environ.get('ADI_BOT_PASSWORD')+'@cluster0.wkuda.mongodb.net/Adi_Bot?retryWrites=true&w=majority'
class Development(Config):
SQLALCHEMY_DATABASE_URI='sqlite:///' + os.path.join(basedir, 'app.db')
SQLALCHEMY_TRACK_MODIFICATIONS=False
DEBUG = True
MONGO_URI = os.environ.get("MONGO_URI")
class Production(Config):
SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(basedir, 'app.db')
SQLALCHEMY_TRACK_MODIFICATIONS=False
DEBUG=False
MONGO_URI = os.environ.get("MONGO_URI")