From: Tom Hunger Date: Fri, 16 Jan 2015 10:12:20 +0000 (+0000) Subject: Use 4 spaces of indent for config.py for consistency. X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=25d0b5c060d12c7d84eb8935878ceb429a83362a;p=sirius.git Use 4 spaces of indent for config.py for consistency. --- diff --git a/sirius/config.py b/sirius/config.py index 346bda5..755a2c4 100755 --- a/sirius/config.py +++ b/sirius/config.py @@ -3,58 +3,58 @@ basedir = os.path.abspath(os.path.dirname(__file__)) class Config: - SECRET_KEY = os.environ.get('SECRET_KEY') or 'this is the lp2 secret' - SQLALCHEMY_COMMIT_ON_TEARDOWN = True + SECRET_KEY = os.environ.get('SECRET_KEY') or 'this is the lp2 secret' + SQLALCHEMY_COMMIT_ON_TEARDOWN = True - @staticmethod - def init_app(app): - pass + @staticmethod + def init_app(app): + pass class TestConfig(Config): - DEBUG = False - SQLALCHEMY_DATABASE_URI = 'sqlite://' - TESTING = True - WTF_CSRF_ENABLED = False - LOGIN_DISABLED = False + DEBUG = False + SQLALCHEMY_DATABASE_URI = 'sqlite://' + TESTING = True + WTF_CSRF_ENABLED = False + LOGIN_DISABLED = False class DevelopmentConfig(Config): - DEBUG = True - SQLALCHEMY_DATABASE_URI = os.environ.get('DEV_DATABASE_URL') or \ - 'sqlite:///' + os.path.join(basedir, 'data-dev.sqlite') + DEBUG = True + SQLALCHEMY_DATABASE_URI = os.environ.get('DEV_DATABASE_URL') or \ + 'sqlite:///' + os.path.join(basedir, 'data-dev.sqlite') class ProductionConfig(Config): - SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL') or \ - 'sqlite:///' + os.path.join(basedir, 'data.sqlite') + 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) + @classmethod + def init_app(cls, app): + Config.init_app(app) class HerokuConfig(ProductionConfig): - SSL_DISABLE = bool(os.environ.get('SSL_DISABLE')) - DEBUG = True + SSL_DISABLE = bool(os.environ.get('SSL_DISABLE')) + DEBUG = True - @classmethod - def init_app(cls, app): - ProductionConfig.init_app(app) + @classmethod + def init_app(cls, app): + ProductionConfig.init_app(app) - # handle proxy server headers - from werkzeug.contrib.fixers import ProxyFix - app.wsgi_app = ProxyFix(app.wsgi_app) + # handle proxy server headers + from werkzeug.contrib.fixers import ProxyFix + app.wsgi_app = ProxyFix(app.wsgi_app) - # log to stderr - import logging - from logging import StreamHandler - file_handler = StreamHandler() - file_handler.setLevel(logging.WARNING) - app.logger.addHandler(file_handler) + # log to stderr + import logging + from logging import StreamHandler + file_handler = StreamHandler() + file_handler.setLevel(logging.WARNING) + app.logger.addHandler(file_handler) config = { - 'development': DevelopmentConfig, - 'production': ProductionConfig, - 'heroku': HerokuConfig, - 'test': TestConfig, + 'development': DevelopmentConfig, + 'production': ProductionConfig, + 'heroku': HerokuConfig, + 'test': TestConfig, - 'default': DevelopmentConfig + 'default': DevelopmentConfig }