this is my code:
class A(db.Model):
a=db.StringProperty()
class demo(BaseRequestHandler):
def get(self):
a=''
def fn():
global a
a=A(a='www')
a.put()
db.run_in_transaction(fn)
raise Exception(a.key())
and the error is :
raise Exception(a.key())
AttributeError: 'str' object has no attribute 'key'
so how to get the right 'a' ,
thanks