forked from wonderful/docker-k8s-devops
44 lines
1.1 KiB
Python
Executable File
44 lines
1.1 KiB
Python
Executable File
# Copyright 2016 Cisco Systems, Inc.
|
|
# All rights reserved.
|
|
|
|
import os
|
|
basedir = os.path.abspath(os.path.dirname(__file__))
|
|
|
|
|
|
class BaseConfig(object):
|
|
"""Base configuration."""
|
|
SECRET_KEY = 'my_precious'
|
|
DEBUG = False
|
|
BCRYPT_LOG_ROUNDS = 13
|
|
WTF_CSRF_ENABLED = True
|
|
DEBUG_TB_ENABLED = False
|
|
DEBUG_TB_INTERCEPT_REDIRECTS = False
|
|
SQLALCHEMY_TRACK_MODIFICATIONS = False
|
|
SQLALCHEMY_DATABASE_URI = os.environ.get(
|
|
'DATABASE_URL', 'sqlite:///' + os.path.join(basedir, 'db.sqlite'))
|
|
|
|
|
|
class DevelopmentConfig(BaseConfig):
|
|
"""Development configuration."""
|
|
DEBUG = True
|
|
BCRYPT_LOG_ROUNDS = 4
|
|
WTF_CSRF_ENABLED = False
|
|
DEBUG_TB_ENABLED = True
|
|
|
|
|
|
class TestingConfig(BaseConfig):
|
|
"""Testing configuration."""
|
|
DEBUG = True
|
|
TESTING = True
|
|
BCRYPT_LOG_ROUNDS = 4
|
|
WTF_CSRF_ENABLED = False
|
|
DEBUG_TB_ENABLED = False
|
|
PRESERVE_CONTEXT_ON_EXCEPTION = False
|
|
|
|
|
|
class ProductionConfig(BaseConfig):
|
|
"""Production configuration."""
|
|
SECRET_KEY = 'my_precious'
|
|
DEBUG = False
|
|
DEBUG_TB_ENABLED = False
|