2017-12-20 6 views
-2

Python hier Neuling plzUnexpected Attribut 'name' für Objekt vom Typ Index

indexes: 


# AUTOGENERATED 
# This index.yaml is automatically updated whenever the dev_appserver 
# detects that a new type of query is run. If you want to manage the 
# index.yaml file manually, remove the above marker line (the line 
# saying "# AUTOGENERATED"). If you want to manage some indexes 
# manually, move them above the marker line. The index.yaml file is 
# automatically uploaded to the admin console when you next deploy 
# your application using appcfg.py. 

- kind: Post 
properties: 
- name: user 
- name: created 
    direction: desc 

    - kind: Post 
    ancestor: yes 
    properties: 
    - name: created 
    direction: desc 

- kind: Post 
    ancestor: yes 
    properties: 
    - name: date 
    direction: desc 

den Fehler hier ist Unexpected Attribut 'name' für Objekt des Typs Index gebildet helfen. dies tritt auf, wenn der folgende Befehl

gcloud deploy app index.yaml 

Antwort

0

Ihre yaml Datei verwendet wird Einbuchtung falsch ist, sollte es so aussehen:

indexes: 


# AUTOGENERATED 
# This index.yaml is automatically updated whenever the dev_appserver 
# detects that a new type of query is run. If you want to manage the 
# index.yaml file manually, remove the above marker line (the line 
# saying "# AUTOGENERATED"). If you want to manage some indexes 
# manually, move them above the marker line. The index.yaml file is 
# automatically uploaded to the admin console when you next deploy 
# your application using appcfg.py. 

- kind: Post 
    properties: 
    - name: user 
    - name: created 
    direction: desc 

- kind: Post 
    ancestor: yes 
    properties: 
    - name: created 
    direction: desc 

- kind: Post 
    ancestor: yes 
    properties: 
    - name: date 
    direction: desc 
Verwandte Themen