OSDN Git Service

Merge pull request #41 from Bytom/dev
[bytom/vapor.git] / tools / side_chain_tool / config.py
1 # -*- coding:utf-8 -*-
2 import os
3 basedir = os.path.abspath(os.path.dirname(__file__))
4
5 class Config:
6     SECRET_KEY = os.environ.get('SECRET_KEY') or 'hard to guess string'
7     SECURITY_PASSWORD_SALT = os.environ.get('SECURITY_PASSWORD_SALT') or 'hard to guess string'
8     SSL_DISABLE = False
9     SQLALCHEMY_COMMIT_ON_TEARDOWN = True
10     SQLALCHEMY_RECORD_QUERIES = True
11     POSTS_PER_PAGE = os.environ.get('POSTS_PER_PAGE')
12     FLASKY_SLOW_DB_QUERY_TIME = 0.5
13
14     @staticmethod
15     def init_app(app):
16         pass
17
18 # 生产坏境
19 class DevelopmentConfig(Config):
20     SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL') or \
21                               'sqlite:///' + os.path.join(basedir, 'data.sqlite')
22
23
24
25 conifg = {
26     'default': DevelopmentConfig
27 }