每次项目运行时应用引擎数据存储都会自动清除 [英] app engine datastore auto-clears every time project runs

查看:19
本文介绍了每次项目运行时应用引擎数据存储都会自动清除的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每次运行我的项目(django 中的 dev_appserver.py myapp 或 manage.py runserver)时,数据存储都会被清除.我已经在 Django 中通过 model.put() 或 model.save() 保存了数据.在当前会话中,我可以在管理页面中看到数据,但是下次运行该项目时,所有以前的数据存储都丢失了.

Every time I run my project (eith dev_appserver.py myapp or manage.py runserver in django), the datastore will be cleared. I have persisted the data by model.put() or model.save() in django. In the current session, I can see the data in the admin page, but next time I run the project, all previous datastore is lost.

我知道应用引擎有 --clear_datastore 运行条件,但我不想要这个功能.

I know app engine has the --clear_datastore run condition, but i dont't want this feature.

顺便问一下,本地数据存储文件在哪里?

By the way, where is there a local datastore file?

推荐答案

您可以将 --datastore_path=/datastore/path/dev_appserver.datastore 参数与 dev_appserver.py 一起使用

you can use the --datastore_path=/datastore/path/dev_appserver.datastore parameter with dev_appserver.py

--blobstore_path=/path/to/blobstore/folder 也是一个选项.

这篇关于每次项目运行时应用引擎数据存储都会自动清除的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆