我正在关注谷歌应用引擎入门教程。我在这一点上; https://developers.google.com/appengine/docs/python/gettingstartedpython27/templates
我试图遵循它,但当我从谷歌应用引擎启动器启动我的应用程序时,我在日志中看到了这一点;
---- a long traceback, followed by ----
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\api\yaml_listener.py", line 177, in _HandleEvents
raise yaml_errors.EventError(e, event_object)
google.appengine.api.yaml_errors.EventError: Unexpected attribute 'indexes' for object of type AppInfoExternal.
in "C:\Users\muhammed\Desktop\guestbook\app.yaml", line 18, column 1
2013-09-12 13:01:26 (Process exited with code 1)
以下是我的app.yaml
文件的样子;
application: your-app-id
version: 1
runtime: python27
api_version: 1
threadsafe: true
handlers:
- url: /.*
script: guestbook.application
libraries:
- name: webapp2
version: latest
- name: jinja2
version: latest
indexes:
- kind: Greeting
ancestor: yes
properties:
- name: date
direction: desc
我在这里做错了什么?
答案 0 :(得分:3)
本教程不会告诉您将索引放入app.yaml。它们放在一个单独的文件index.yaml中。但是你通常不必费心,因为当你在本地运行你的代码时,开发服务器会为你创建它们。