On Wed, Jun 2, 2010 at 3:49 PM, Massimiliano
<massimiliano.pietr...@gmail.com> wrote:
> Oh sorry, it was really easy...
> field = field + " = "
> lista = db.Query(FOOD).filter(field,food).order('-Date').fetch(limit=30)

Or:
lista = db.Query(FOOD).filter('%s ='%field,food).order('-Date').fetch(limit=30)


> Now it's working....
> thanks
> Massimiliano
> 2010/6/2 andreas schmid <a.schmi...@gmail.com>
>>
>> i think what you are missing in your code is the operator after the field
>> var in the filter. (= , < , >,...)
>> you use it like .filter('field =', 'value')
>> On Jun 2, 2010, at 12:57 PM, Massimiliano wrote:
>>
>> I have read it. And i was serching where he is talking about this, but I
>> can't find!!!
>> I'm searching again!
>> Thanks
>> Massimiliano
>>
>> 2010/6/2 Robert Kluin <robert.kl...@gmail.com>
>>>
>>> I suggest you have a look an introductory programming resouce.  For
>>> starters, see the python getting started guide:
>>> http://www.python.org/about/gettingstarted/
>>>
>>> Robert
>>>
>>>
>>> On Jun 2, 2010, at 11:40, Massimiliano <massimiliano.pietr...@gmail.com>
>>> wrote:
>>>
>>> In my file I have:
>>> food = self.request.get('food')
>>> field = self.request.get('field')
>>> lista = db.Query(FOOD).filter(field, food).order('-Date').fetch(limit=30)
>>> I need field to be "Myfieldvar="
>>> How can I do this?
>>> Max
>>> 2010/6/2 Robert Kluin <robert.kl...@gmail.com>
>>>>
>>>> As the page you link to says, it takes a string as the first argument --
>>>> so, yes. It can take a variable.
>>>> myvar = "prop >"
>>>> Kind.all().filter(myvar, 5)
>>>>
>>>> Robert
>>>>
>>>>
>>>>
>>>> On Jun 2, 2010, at 3:39, Massimiliano <massimiliano.pietr...@gmail.com>
>>>> wrote:
>>>>
>>>> Dear All,
>>>> in filter(property_operator, value) could the property_operator be a
>>>> var?
>>>> Could you please tell me how it must be
>>>> done? http://code.google.com/intl/it-IT/appengine/docs/python/datastore/queryclass.html#Query_filter
>>>> I can't find more details.
>>>> Regards
>>>> Massimiliano
>>>> --
>>>>
>>>> My email: massimiliano.pietr...@gmail.com
>>>> My Google Wave: massimiliano.pietr...@googlewave.com
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Google App Engine" group.
>>>> To post to this group, send email to google-appeng...@googlegroups.com.
>>>> To unsubscribe from this group, send email to
>>>> google-appengine+unsubscr...@googlegroups.com.
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/google-appengine?hl=en.
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Google App Engine" group.
>>>> To post to this group, send email to google-appeng...@googlegroups.com.
>>>> To unsubscribe from this group, send email to
>>>> google-appengine+unsubscr...@googlegroups.com.
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/google-appengine?hl=en.
>>>
>>>
>>>
>>> --
>>>
>>> My email: massimiliano.pietr...@gmail.com
>>> My Google Wave: massimiliano.pietr...@googlewave.com
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Google App Engine" group.
>>> To post to this group, send email to google-appeng...@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> google-appengine+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/google-appengine?hl=en.
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Google App Engine" group.
>>> To post to this group, send email to google-appeng...@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> google-appengine+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/google-appengine?hl=en.
>>
>>
>>
>> --
>>
>> My email: massimiliano.pietr...@gmail.com
>> My Google Wave: massimiliano.pietr...@googlewave.com
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google App Engine" group.
>> To post to this group, send email to google-appeng...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-appengine+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/google-appengine?hl=en.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google App Engine" group.
>> To post to this group, send email to google-appeng...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-appengine+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/google-appengine?hl=en.
>
>
>
> --
>
> My email: massimiliano.pietr...@gmail.com
> My Google Wave: massimiliano.pietr...@googlewave.com
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to google-appeng...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to