-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
34 lines (26 loc) · 791 Bytes
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import os
basedir = os.path.abspath(os.path.dirname(__file__))
class BaseConfig(): # 基本配置类
AUTHOR = 'aolens'
# SECRET_KEY = os.getenv('SECRET_KEY', 'DB_URI')
class DevelopmentConfig(BaseConfig):
DEBUG = True
HOST = 'localhost'
PORT = '5432'
DATABASE = "weigodb"
USER = "postgres"
PASSWORD = "123456"
# SQL_DATABASE_URI = 'postgresql://postgres:123456@localhost/weigo_testdb'
class TestingConfig(BaseConfig):
TESTING = True
HOST = 'localhost'
PORT = '5432'
DATABASE = "weigo_testdb"
USER = "postgres"
PASSWORD = "123456"
# SQL_DATABASE_URI = 'postgresql://postgres:123456@localhost/weigo_testdb'
config = {
'development': DevelopmentConfig,
'testing': TestingConfig,
'default': DevelopmentConfig
}