Skip to content

Instantly share code, notes, and snippets.

@pelid
Created April 3, 2017 10:56
Show Gist options
  • Save pelid/7889694e5519e057120177beb1721a26 to your computer and use it in GitHub Desktop.
Save pelid/7889694e5519e057120177beb1721a26 to your computer and use it in GitHub Desktop.
WALL·E fail with report: "Названия заглавными буквами с подчёркиванием принято использовать только для глобальных переменных. (например, debug, testing, csrf_enabled, secret_key, sqlalchemy_database_uri, sqlalchemy_track_modifications, sqlalchemy_migrate_repo, debug, development, debug, development, debug, testing)"
import os
basedir = os.path.abspath(os.path.dirname(__file__))
DEBUG = False
DEVELOPMENT = False
TESTING = False
CSRF_ENABLED = False
SECRET_KEY = ''
SQLALCHEMY_DATABASE_URI = ''
SQLALCHEMY_TRACK_MODIFICATIONS = False
SQLALCHEMY_MIGRATE_REPO = ''
class Config(object):
DEBUG = False
TESTING = False
CSRF_ENABLED = True
SECRET_KEY = 'top secret!'
SQLALCHEMY_DATABASE_URI = os.environ['DATABASE_URL']
SQLALCHEMY_TRACK_MODIFICATIONS = True
SQLALCHEMY_MIGRATE_REPO = os.path.join(basedir, 'db_repository')
class ProductionConfig(Config):
DEBUG = False
class StagingConfig(Config):
DEVELOPMENT = True
DEBUG = True
class DevelopmentConfig(Config):
DEVELOPMENT = True
DEBUG = True
class TestingConfig(Config):
TESTING = True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment