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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
| import platform
|
|
| def is_windows():
| system = platform.system()
| if system == 'Windows':
| return True
| return False
|
|
|
| # redis设置
| REDIS_CONFIG = {
| "host": "192.168.3.252",
| "port": 6379,
| "db": 0,
| "pwd": "123456"
| } if is_windows() else {
| "host": "172.16.32.15",
| "port": 6379,
| "db": 0,
| "pwd": "Yeshi2016@"
|
| # "host": "127.0.0.1",
| # "port": 6380,
| # "db": 0,
| # "pwd": "123456"
| }
|
| MYSQL_CONFIG = {
| "host": "192.168.3.252",
| "port": 3306,
| "database": "gp",
| "charset": "utf8",
| "user": "root",
| "passwd": "123456"
| } if is_windows() else {
| "host": "172.16.16.17",
| "port": 3306,
| "database": "gp",
| "charset": "utf8",
| "user": "root",
| "passwd": "Yeshi2016@"
| }
|
| # 获取根路径
| def get_path_prefix():
| return 'D:' if is_windows() else '/home'
|
|