def delete(self, **kwargs): db = cherrypy.request.db event = Event.get_by_id(db, kwargs['uid']) if event is not None: db.delete(event) raise cherrypy.HTTPRedirect("/admin/events/")
def manage(self, event_id = None,**kwargs): if event_id is None: raise cherrypy.HTTPRedirect("/admin/events/") db = cherrypy.request.db event = Event.get_by_id(db,event_id) plugins = tourney.PLUGIN_MANAGER.get_plugins("Game system") return {'selected_event': event, 'game_systems': plugins}