Skip to content
Snippets Groups Projects
Verified Commit a9111aef authored by Sachin Kamath's avatar Sachin Kamath
Browse files

Add instance and config

parent 5da50705
No related branches found
No related tags found
No related merge requests found
......@@ -57,7 +57,7 @@ coverage.xml
local_settings.py
# Flask stuff:
instance/
migrations/
.webassets-cache
# Scrapy stuff:
......
# coding=utf-8
# coding=utf-8
import os
class Config(object):
"""Parent configuration class."""
DEBUG = False
CSRF_ENABLED = True
TESTING = False
SECRET = os.getenv('SECRET')
SQLALCHEMY_DATABASE_URI = os.getenv('DATABASE_URL')
class DevelopmentConfig(Config):
"""Configurations for Development."""
DEBUG = False
SQLALCHEMY_DATABASE_URI = 'postgresql://localhost/test_db'
SECRET = "ChangeThisStringIfYouWant"
TESTING = False
class TestingConfig(Config):
"""Configurations for Testing, with a separate test database."""
TESTING = True
SQLALCHEMY_DATABASE_URI = 'postgresql://localhost/test_db'
DEBUG = True
SECRET = 'ChangeMeMaybe'
class StagingConfig(Config):
"""Configurations for Staging."""
DEBUG = True
class ProductionConfig(Config):
"""Configurations for Production."""
DEBUG = False
TESTING = False
SQLALCHEMY_DATABASE_URI = 'postgresql://localhost/hodor_prod'
SECRET = "TODO: ChangeMeInProduction"
app_config = {
'development': DevelopmentConfig,
'testing': TestingConfig,
'staging': StagingConfig,
'production': ProductionConfig,
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment