def webapi_token_saved_cb(instance, created, **kwargs):
 if created:
  op = u'created'
 else:
  op = u'updated'
 mail_webapi_token(instance, op)

def webapi_token_saved_cb ( instance , created , ** kwargs ) : if created : op = u'created' else : op = u'updated' mail_webapi_token ( instance , op )
send e-mail when an api token is created or updated .