google app engine - How to find entries which has not empty StringListProperty? -
i have following model in google appengine app.
class testmodel(db.model): names = db.stringlistproperty(required=false)
so, want entries has not empty in names property. tried this.
testmodel.all().filter('names !=', [])
but raises exception: badvalueerror: filtering on lists not supported
how can filter it? or should check 1 one following?
for entry in testmodel.all(): if len(entry.names) > 0: result.append(entry)
try this:
testmodel.all().filter('names >=', none)
this give every entity @ least 1 value set names, i.e. every value in index.
Comments
Post a Comment