I am using Google App Engine's datastore and wants to retrieve an entity whose key value is written as
ID/Name
id=1
Can anyone suggest me a GQL query to view that entity in datastore admin console and also in my python program?
I am using Google App Engine's datastore and wants to retrieve an entity whose key value is written as
ID/Name
id=1
Can anyone suggest me a GQL query to view that entity in datastore admin console and also in my python program?
An application can retrieve a model instance for a given Key using the get() function.
class member(db.Model):
firstName=db.StringProperty(verbose_name='First Name',required=False)
lastName=db.StringProperty(verbose_name='Last Name',required=False)
...
id = int(self.request.get('id'))
entity= member.get(db.Key.from_path('member', id))
I'm not sure how to return a specific entity in the admin console.
From your application use the get_by_id() class method of the Model:
From Datastore viewer you should use the
KEY
function: