gpt4 book ai didi

python - 使用 Python 为 Google App Engine 生成 CRUD 网页的最快方法是什么?

转载 作者:太空狗 更新时间:2023-10-30 00:00:24 25 4
gpt4 key购买 nike

我已经使用 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com