We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ea73c70 + e6aec2d commit 78378d3Copy full SHA for 78378d3
1 file changed
leancloud/client.py
@@ -25,7 +25,16 @@
25
APP_KEY = None
26
MASTER_KEY = None
27
HOOK_KEY = None
28
-USE_PRODUCTION = '1'
+if os.getenv('LEANCLOUD_APP_ENV') == 'production':
29
+ USE_PRODUCTION = '1'
30
+elif os.getenv('LEANCLOUD_APP_ENV') == 'stage':
31
+ USE_PRODUCTION = '0'
32
+else: # probably on local machine
33
+ if os.getenv('LEAN_CLI_HAVE_STAGING') == 'true':
34
35
+ else: # free trial instance only
36
37
+
38
USE_HTTPS = True
39
# 兼容老版本,如果 USE_MASTER_KEY 为 None ,并且 MASTER_KEY 不为 None,则使用 MASTER_KEY
40
# 否则依据 USE_MASTER_KEY 来决定是否使用 MASTER_KEY
0 commit comments