Max,

It looks as though you may be intending to fetch an object based on its key
name rather than its key?  If you build an object using a specified key
name, e.g.:
  MyModel.get_or_insert(key_name='some_key')

Then you can fetch it like this:

  myobject = MyModel.get_by_key_name('some_key')

or  alternately:

  k = db.Key.from_path('MyModel', 'some_key')
  myobject = db.get(k)

 –Amy

On Sun, Oct 23, 2011 at 8:43 AM, Max <[email protected]>wrote:

> Thanks, but now I have something new.
>
> BadFilterError: BadFilterError: invalid filter: __key__ filter value must be 
> a Key; received  (a str).
>
>
> I'm taking the key from the domain name:
> def main():
> application = webapp.WSGIApplication([
> ('/ristorante', RistoHandler),
> (r'/(.*)/modifica', ModificaHandler),
> ('/.*', MainHandler)],
> debug=True)
> wsgiref.handlers.CGIHandler().run(application)
> Can you help me with this too?
> Thanks
> Max
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-appengine/-/LO6RGlxuTPMJ.
>
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> 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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to