python - NDB querying results that start with a string -


working google app engine's ndb, i'm looking query items start user-inputted string. example:

abc_123 abcdefg 123abc 

querying "abc" should return abc_123, abcdefg (however, not 123abc doesn't start "abc")

i used code below similar different purpose:

q = q.filter(order._properties[kw].in(values_list)) 

which filtered values in values_list in kw, looking filter values start string in kw.

try:

kind.query(ndb.and(kind.property >= "abc", kind.property <= "abcz")) 

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -