app-engine-patch manage.pyが、dev_appserver.pyの実行時に使用されるdefualtパスとは異なるデータストアパスを使用する問題
デフォルトは次のとおりです。
- %TEMP%\ dev_appserver.datastore
- %TEMP%\ dev_appserver.datastore.history
manage.pyは以下を使用します:
- %TEMP%\ django_.datastore
- %TEMP%\ django_.datastore.history
これは、プロジェクト設定を介してカスタマイズできます。この違いを担当する関数は、in \ django \ db \ backends \ appengine\base.pyです。
def get_datastore_paths(settings_dict):
"""Returns a tuple with the path to the datastore and history file.
The datastore is stored in the same location as dev_appserver uses by
default, but the name is altered to be unique to this project so multiple
Django projects can be developed on the same machine in parallel.
Returns:
(datastore_path, history_path)
"""
from google.appengine.tools import dev_appserver_main
options = settings_dict['DATABASE_OPTIONS']
datastore_path = options.get('datastore_path',
dev_appserver_main.DEFAULT_ARGS['datastore_path'].replace(
"dev_appserver", "django_%s" % appid))
history_path = options.get('history_path',
dev_appserver_main.DEFAULT_ARGS['history_path'].replace(
"dev_appserver", "django_%s" % appid))
return datastore_path, history_path