本文整理匯總了Python中persistence.PersistenceManager.delete_tourney_list_details方法的典型用法代碼示例。如果您正苦於以下問題:Python PersistenceManager.delete_tourney_list_details方法的具體用法?Python PersistenceManager.delete_tourney_list_details怎麽用?Python PersistenceManager.delete_tourney_list_details使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類persistence.PersistenceManager
的用法示例。
在下文中一共展示了PersistenceManager.delete_tourney_list_details方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: delete_list_and_retry
# 需要導入模塊: from persistence import PersistenceManager [as 別名]
# 或者: from persistence.PersistenceManager import delete_tourney_list_details [as 別名]
def delete_list_and_retry():
tourney_list_id = request.args.get('tourney_list_id')
print("calling delete list and retry on tourney id " + tourney_list_id)
pm = PersistenceManager(myapp.db_connector)
tourney_list = pm.get_tourney_list(tourney_list_id)
pm.delete_tourney_list_details( tourney_list )
event = Event(remote_address=myapp.remote_address(request),
event_date=func.now(),
event="delete list",
event_details="deleted list id %d from tourney %s" % ( tourney_list.id, tourney_list.tourney.tourney_name ))
pm = PersistenceManager(myapp.db_connector)
pm.db_connector.get_session().add(event)
pm.db_connector.get_session().commit()
return redirect( url_for('enter_list', tourney=tourney_list.tourney.id, tourney_list_id=tourney_list.id ) )