Daniel Wong
unread,Nov 21, 2009, 6:25:08 PM11/21/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to app-engine-django
I've been reading about and trying to understand how indexes are
necessary in order to run queries, so I open my /_ah/admin/interactive
i.e. the Interactive Console and run the following program:
<code>
from app.models import Foo
if False: # True on first run. False on later runs
a = Foo(
title = 't',
category = 'c',
description = 'd' )
a.put()
print 'put new entity'
q = Foo.all()
q.filter('title =', 't')
q.filter('category =', 'c')
# when I uncomment the following line, an empty list gets printed
#q.filter('description =', 'd')
print [e.description for e in q]
</code>
Why is it that when I uncomment the last filter, I get no results, but
when I do, I get the one Foo that I just inserted? I believe I have
added the right config to my index.yaml:
- kind: Foo
properties:
- name: title
- name: category
- name: description
Yet, I still get no love from gae. What am I doing wrong here?