本文整理汇总了Python中helpers.event_team_manipulator.EventTeamManipulator.delete方法的典型用法代码示例。如果您正苦于以下问题:Python EventTeamManipulator.delete方法的具体用法?Python EventTeamManipulator.delete怎么用?Python EventTeamManipulator.delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类helpers.event_team_manipulator.EventTeamManipulator
的用法示例。
在下文中一共展示了EventTeamManipulator.delete方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: post
# 需要导入模块: from helpers.event_team_manipulator import EventTeamManipulator [as 别名]
# 或者: from helpers.event_team_manipulator.EventTeamManipulator import delete [as 别名]
def post(self, event_key_id):
logging.warning("Deleting %s at the request of %s / %s" % (
event_key_id,
users.get_current_user().user_id(),
users.get_current_user().email()))
event = Event.get_by_id(event_key_id)
matches = Match.query(Match.event == event.key).fetch(5000)
MatchManipulator.delete(matches)
event_teams = EventTeam.query(EventTeam.event == event.key).fetch(5000)
EventTeamManipulator.delete(event_teams)
EventManipulator.delete(event)
self.redirect("/admin/events?deleted=%s" % event_key_id)