我已经使用 Python 为我的数据库创建了一组模型。现在我想用一些数据快速加载它们——手动。如果这是一个 .NET 应用程序,我会使用 Visual Studio 附带的一个漂亮的控件来快速连接到数据库并将网格绑定(bind)到它。然后去镇上添加数据。
使用 Google App Engine 在 Python 中执行此操作的匹配方法是什么?
在 ASP.NET MVC 中,他们有这个新的“脚手架”东西( Entity Framework 的一部分)可以为您生成 CRUD 页面。在 GAE 中给定一堆模型对象是否有类似的东西?
附言使用方便、花哨的命令行选项 --use_sqlite 和 --datastore_path,我可以在我的开发环境中快速备份我的数据库。
最佳答案
如果您在 GAE 上使用 Django,那么您可以使用 Django Administration site :
So what’s Django’s approach to these boring, repetitive tasks? It does it all for you—in just a couple of lines of code, no less. With Django, building an admin interface is a solved problem.
它会自动构建基于 CRUD 的 HTML 表单来管理模型。
关于python - 使用 Python 为 Google App Engine 生成 CRUD 网页的最快方法是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6803588/