Assigning an author to an entity during its creation
问题 I am doing Udacity's Web Dev Course with Google Appengine and Python. I would like to know how I could assign to a created entity, its own author . For example, I have two ndb.Models kinds: class User(ndb.Model): username = ndb.StringProperty(required = True) bio = ndb.TextProperty(required = True) password = ndb.StringProperty(required = True) email = ndb.StringProperty() created = ndb.DateTimeProperty(auto_now_add = True) class Blog(ndb.Model): title = ndb.StringProperty(required = True)