Last active
January 22, 2020 15:32
-
-
Save Porter97/d69606973283c3220842d45a2e51c971 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
basedir = os.path.abspath(os.path.dirname(__file__)) | |
class Config: | |
SECRET_KEY = os.environ.get(‘SECRET_KEY’, ‘secret’) | |
STREAM_API_KEY = ‘’#Insert your Stream API key her | |
STREAM_SECRET = ‘’#Insert your Stream Secret here | |
@staticmethod | |
def init_app(app): | |
pass | |
class DevelopmentConfig(Config): | |
DEBUG = True | |
SQLALCHEMY_DATABASE_URI = os.environ.get(‘DEV_DATABASE_URL’) or \ | |
‘sqlite:///’ + os.path.join(basedir, ‘data-dev.sqlite’) | |
class TestingConfig(Config): | |
TESTING = True | |
SQLALCHEMY_DATABASE_URI = os.environ.get(‘TEST_DATABASE_URL’) or \ | |
‘sqlite://’ | |
WTF_CSRF_ENABLED = False | |
class ProductionConfig(Config): | |
SQLALCHEMY_DATABASE_URI = os.environ.get(‘DATABASE_URL’) or \ | |
‘sqlite:///’ + os.path.join(basedir, ‘data/sqlite’) | |
@classmethod | |
def init_app(cls, app): | |
Config.init_app(app) | |
config = { | |
‘development’: DevelopmentConfig, | |
‘testing’: TestingConfig, | |
‘production’: ProductionConfig, | |
‘default’: DevelopmentConfig | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment