I am looking for a way to trigger an event on the application engine when creating a User. I have something like
def create_user(data):
user = new User(data)
user.put()
trigger('user_created', user)
return user
Thus, external modules can modify the object when creating a new user. I suppose I can add something like
add_hook('user_created', some_function)
for external modules (during application initialization). This function will add fields to an entity of type
def some_function(user):
user.data = 'some value'
What would be the best way to do this in an application?
source
share