errror,运行谷歌应用程序引擎项目
问题描述:
您好我已经创建了一个谷歌应用程序引擎项目从下面的代码main.pyerrror,运行谷歌应用程序引擎项目
import webapp2
class MainPage(webapp2.RequestHandler):
def get(self):
self.response.headers['Content-type'] = 'text/plain'
self.response.write('Hello, World!')
application = webapp2.WSGIApplication([
('/', MainPage)
], debug = True)
的例子 文件名名称,并在app.yaml文件我已经加入如下这些配置
application: casberra
version: 1
runtime: python27
api_version: 1
threadsafe: true
handlers:
- url: /.*
script: main.application
前面我已经把这些文件的文件夹命名为GAE中,但是当我尝试从命令运行它们 GAE/google_appengine/dev_appserver.py GAE /并通过app.yam前面配置l脚本:gae.application会抛出一个错误,说没有名为gae的模块,但是当我使用该文件夹和main.py作为主应用程序名称运行平稳时。我如何使用不同的项目文件,比如gae或者比main更类似的东西?
答
主要被称为main没有限制。我的意思是即使在Google's Python tutorial他们使用helloworld.py,而不是main.py.如果一切都正确命名,它应该通过。我只是不明白为什么你把一个特定的文件夹,似乎是不必要的
是的,它是工作。谢谢 – Kalanamith 2015-01-05 04:57:34