App Engine:将表单数据提交到 Google 电子表格

发布于 2024-11-14 21:28:20 字数 451 浏览 5 评论 0原文

我们希望在 App Engine 应用程序中复制 Google 电子表格表单向导功能。这样做的原因是谷歌表单看起来很丑,而且表单向导显然没有提供足够的钩子来使布局更好。

您是否知道如何在 App Engine 中集成 Google Spreadsheet GData API 以便持久存储目标电子表格和身份验证令牌的示例?该电子表格位于我们的 Google Apps 域中,在我们自己的登录后面,并且在任何时候都不应向网站用户公开。

所以我们在想

1) 从 Google Spreadsheet API 中提取电子表格 ID 和身份验证令牌(如何)

2) 通过 App Engine 控制台将这些内容存储在 App Engine 数据存储中

3) 创建 Django 表单并让我们的前端开发人员设计样式5

) Django 表单处理程序使用 GData API 直接将结果提交到电子表格中

We'd like to duplicate the Google Spreadsheet Form Wizard functionality within our App Engine application. The rational for this is that Google forms look ugly and the form wizard apparently does not provide enough hooks to make layout better.

Do you know any examples how to integrate Google Spreadsheet GData API in App Engine, so that the target spreadsheet and authentication tokens would be persistently stored? The spreadsheet is on our Google Apps domain, behind our own login and it should not be exposed to the site user in any point.

So we were thinking

1) Extract spreadsheet id and authentication token(s) from Google Spreadsheet API (how)

2) Store these in App Engine data store through App Engine console

3) Create a Django form and let our front-end developers to style it

5) Django form handler submits the results into the spreadsheet directly using GData API

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

心舞飞扬 2024-11-21 21:28:20

你写的一切都有道理,但问题在哪里?
您可以将 python gdata 客户端库放入您的 GAE 项目中。
您可以公开电子表格(使其可以从外部世界访问),但将其保留为私有,这样没有人能够手动访问它,并验证您的 GAE Django 应用程序。简单地说 - 在 SSL 后面使用普通身份验证,使用 OAuth 更好,请参阅 gdata 文档: http://code.google.com/apis/documents/docs/3.0/developers_guide_python.html

为了获取电子表格的信息 - 首先手动创建它,然后使用 python 代码加载文档列表,它应该有一个条目,转储其 ID,您将能够从每个需要条目或 ID 的方法像“电子表格:ID”一样访问它

您还应该(可能)能够通过传递给的 URL 访问它相同的方法,因为我看到名为entry_or_id_or_url的方法参数。

Everything you write makes sense, but where's the question?
You can put python gdata client library into your GAE project.
You can expose the spreadsheet (make it accessible from the outer world), but leave it private, so nobody would be able to manually access it, and authenticate your GAE Django app. Trivially - with plain auth behind SSL, byt better with OAuth, see gdata docs: http://code.google.com/apis/documents/docs/3.0/developers_guide_python.html

In order to get information for you spreadsheet - well, first manually create it, then from python code load documents list, it should have a single entry, dump its ID, and you will be able accessing it like 'spreadsheet:ID' from every method that expects Entry OR ID

You should also be (probably) able accessing it by URL passed to the same methods, bacuse I saw method parameter named entry_or_id_or_url.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文