Created
July 10, 2018 17:44
-
-
Save jattoabdul/5253dcc2655c8f2ccbcb8c71a84b45f2 to your computer and use it in GitHub Desktop.
Config env.py file.
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
from config import get_env | |
class EnvConfig(object): | |
"""Parent configuration class.""" | |
DEBUG = False | |
CSRF_ENABLED = True | |
SECRET = get_env('SECRET') | |
class DevelopmentEnv(EnvConfig): | |
"""Configurations for Development.""" | |
DEBUG = True | |
class TestingEnv(EnvConfig): | |
"""Configurations for Testing, with a separate test database.""" | |
TESTING = True | |
DEBUG = True | |
class StagingEnv(EnvConfig): | |
"""Configurations for Staging.""" | |
DEBUG = True | |
class ProductionEnv(EnvConfig): | |
"""Configurations for Production.""" | |
DEBUG = False | |
TESTING = False | |
app_env = { | |
'development': DevelopmentEnv, | |
'testing': TestingEnv, | |
'staging': StagingEnv, | |
'production': ProductionEnv, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment