Is there a way to use query.filter() to see if an element is in an entity’s string list property? So:
class Rainbow(db.Model):
colors = StringListProperty()
def filt():
results = db.GqlQuery("SELECT * FROM Rainbow WHERE colors = 'yellow'")
return results
This returns all results where the color “yellow” is in the Rainbow. However, is there some way to accomplish this using the query object? So:
def filt():
q = Rainbow.all()
q.filter('colors =', 'yellow') # something like this?
The code you give should work (assuming you add code to actually run the query and fetch the results). If it’s not working please show the actual code you tried and the error you got.