13
さまざまな定数やメソッドのサンドボックス値を提供できるように、私のアプリケーションが開発中であるかどうかをプログラムで判断する必要があります。あなたのアプリがローカルPython開発サーバー上で実行されているかどうかを判断する方法は?
のような何か:
if app.development: # Live mode
FREEBASE_USER = "spam123"
FREEBASE_PSWD = "eggs123"
FREEBASE = freebase
else: # Sandbox mode
FREEBASE_USER = "spam"
FREEBASE_PSWD = "eggs"
FREEBASE = freebase.sandbox
http://stackoverflow.com/questions/1916579/in-python-how-can-i-test-if-im-in-google-app- engine-sdk – hyperslug