Reputation:
How do I get user key? I am trying like this
user = User.get_by_auth_id('k')
print user.key
Its displaying 1. But that key entity is very long.
I am looking for ag5kZXZ......
Upvotes: 1
Views: 211
Reputation: 7158
are you using google.appengine.ext.db or google.appengine.ext.ndb ?
if your are using the standard db module it should be
print str(user.key())
i think with ndb your could get it with:
print user.key.urlsafe()
Upvotes: 1