Google App Engine 到 Twisted
我正打算将 GAE-OpenSocial 项目迁移到 Twisted Matrix 和 Nevow。我对 Nevow 模板非常陌生,除了 Divmod 的 Nevow 项目页面中给出的以外找不到好的文档。有没有关于Newow的书?我在 Nevow 中提供静态文件时遇到问题。对于应用程序引擎,可以轻松地在 app.yaml 中定义静态文件。但在这里我找不到合适的方法。请帮忙。
I was about to migrate the GAE-OpenSocial project to Twisted Matrix and Nevow. I am very new to Nevow templating and couldn't find good documentation other than given in Divmod's Nevow Project page. Is there any books relating to Nevow? I am having trouble serving static files in Nevow. For app engine its easy to define static files in app.yaml. But here I can't find a suitable way. Please help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Nevow 的源目录 Nevow/examples/ 中有大量示例。这些都是可以运行的例子。您可以启动一个服务器,为它们提供索引页面,如下所示:
访问 http://localhost:8080/您将看到示例列表和链接以查看其来源或实际访问它们并查看其输出。
对于静态文件的特殊情况,答案非常简单,只需在某处提供
nevow.static.File
或twisted.web.static.File
即可。There is a large collection of examples in Nevow's source directory, Nevow/examples/. These are all runnable examples. You can start a server which will serve an index page for them like so:
Visit http://localhost:8080/ and you'll see a list of the examples and links to see their source or actually visit them and see their output.
For the particular case of static files, the answer is pretty simple, simply serve up a
nevow.static.File
or atwisted.web.static.File
somewhere.