Esempio n. 1
0
def delete_user(user_key):
  user_ref = get_user_with_key(user_key)
  if not user_ref:
    logging.error("Unable to get user with key: " + str(user_key))
    return 

  badges = badges_dao.get_user_badges(user_ref)
  for b in badges:
    badges_dao.delete_badge_instance(b.key().name())

  return memcache_db.delete_entity_with_key(user_key, "Users")
Esempio n. 2
0
def delete_user(user_key):
    user_ref = get_user_with_key(user_key)
    if not user_ref:
        logging.error("Unable to get user with key: " + str(user_key))
        return

    badges = badges_dao.get_user_badges(user_ref)
    for b in badges:
        badges_dao.delete_badge_instance(b.key().name())

    return memcache_db.delete_entity_with_key(user_key, "Users")
Esempio n. 3
0
def delete_badge_image(badge_image_key):
    return memcache_db.delete_entity_with_key(badge_image_key, "BadgeImage")
Esempio n. 4
0
def delete_badge_instance(badge_instance_key):
    return memcache_db.delete_entity_with_key(badge_instance_key, "BadgeInstance")
Esempio n. 5
0
def delete_account(acc_key):
    memcache_db.delete_entity_with_key(acc_key, "Leaderboard")
    memcache_db.delete_entity_with_key(acc_key, "TrophyCase")
    memcache_db.delete_entity_with_key(acc_key, "Points")
    memcache_db.delete_entity_with_key(acc_key, "Rank")
    return memcache_db.delete_entity_with_key(acc_key, "Accounts")
Esempio n. 6
0
def delete_widget(widget_key, wtype):
  return memcache_db.delete_entity_with_key(widget_key, wtype)
Esempio n. 7
0
def delete_widget(widget_key, wtype):
  return memcache_db.delete_entity_with_key(widget_key, wtype)
Esempio n. 8
0
def delete_account(acc_key):
  memcache_db.delete_entity_with_key(acc_key, "Leaderboard")
  memcache_db.delete_entity_with_key(acc_key, "TrophyCase")
  memcache_db.delete_entity_with_key(acc_key, "Points")
  memcache_db.delete_entity_with_key(acc_key, "Rank")
  return memcache_db.delete_entity_with_key(acc_key, "Accounts")
Esempio n. 9
0
def delete_badge_image(badge_image_key):
    return memcache_db.delete_entity_with_key(badge_image_key, "BadgeImage")
Esempio n. 10
0
def delete_badge_instance(badge_instance_key):
    return memcache_db.delete_entity_with_key(badge_instance_key,
                                              "BadgeInstance")