I'm a newb myself, but I know one way. There is a method, get_by_key_name(), where you get an entity by key_name like this:
greeting = Greeting.get_by_key_name(somekeyname) If you give it one key_name string, it gives you one instance. See: http://code.google.com/appengine/docs/python/datastore/modelclass.html in the section: Model.get_by_key_name Cheers! UK On Aug 10, 10:09 am, Ste <[email protected]> wrote: > Hi, > > I'm a total newbie to App Engine, and to web apps in general, with a > background in front end web design. > > Anyway, I've worked through the (python) "Getting Started" guide, and > it makes sense. Now I'm trying to change small bits and pieces to > better my understanding. > > For instance, I'm now using a descriptive primary key for the > datastore by providing a user-submitted "Key Name": > > greeting = Greeting(key_name="%s" % self.request.get('ID')) > > This works fine. > > However, I'm at a loss as to how to get a row back out of the > datastore by using its Key Name. What variable should I include in my > GQL, or am I missing the point? > > Many thanks, and excuse my ignorance, > Stephen --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
