Skip to content

Instantly share code, notes, and snippets.

@marknagelberg
Created August 20, 2018 03:57
Show Gist options
  • Save marknagelberg/ccc001e4cf844bf9ddac6315029b339f to your computer and use it in GitHub Desktop.
Save marknagelberg/ccc001e4cf844bf9ddac6315029b339f to your computer and use it in GitHub Desktop.
import os
class Config:
SECRET_KEY = os.environ.get('SECRET_KEY') or 'secret string'
class DevelopmentConfig(Config):
DEBUG = True
SQLALCHEMY_DATABASE_URI = os.environ.get('DEV_DATABASE_URL')
class TestingConfig(Config):
TESTING = True
SQLALCHEMY_DATABASE_URI = os.environ.get('TEST_DATABASE_URL')
class StagingConfig(Config):
SQLALCHEMY_DATABASE_URI = os.environ.get('STAGING_DATABASE_URL')
class ProductionConfig(Config):
SQLALCHEMY_DATABASE_URI = os.environ.get('PRODUCTION_DATABASE_URL')
config = {
'development': DevelopmentConfig,
'testing': TestingConfig,
'staging': StagingConfig,
'production': ProductionConfig
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment