if i use this :
class A(db.Model):
a=db.StringProperty()
class demo(BaseRequestHandler):
def get(self):
a=A()
a.a='sss'
a.put()
raise Exception(a.key().id())
i can get the a.key().id() is 961
but if i add key_name="aaa" , the a.key().id() will be None :
class A(db.Model):
a=db.StringProperty()
class demo(BaseRequestHandler):
def get(self):
a=A(key_name="aaa")
a.a='sss'
a.put()
raise Exception(a.key().id())
so how can i get the key().id() when i set a key_name
thanks