def delete(self): """ Remove from database """ if self.dao != None: sqlsession.flush() sqlsession.delete(self.dao) sqlsession.commit() del self.dao
def delete(self): sqlsession.flush() sqlsession.delete(self.dao) sqlsession.flush() for monitor in self.monitors: monitor.delete() del self.monitors sqlsession.commit() del self.dao self.monitors=[]
def render_html(self,for_editing=False, format=None): sqlsession.flush() c.name = self.get_name() c.tiles = self.tiles if format==None: c.format = calypso.Session.session.get_display().format else: c.format=format if for_editing: return render('/tlm/develop/Visualization.html') else: return render ('/tlm/telemetrydisplay.html')
def render_html(self, properties, for_editing=False): sqlsession.flush() sqlsession.commit() c.formatview= self.get_name().replace(' ','_') c.properties=properties c.monitors=self.monitors() c.flatattrs={} c.x_pos=properties.x_pos() c.y_pos=properties.y_pos() for mon in c.monitors: for attr in mon.attrs(): if not(c.flatattrs.has_key(attr[0])): c.flatattrs[attr[0]]=attr c.content_type = 'html' c.name = self.display.format.name c.tile = self c.display_ops=for_editing try: return render('/tlm/develop/Visualization-tile_view.html'); except: import traceback traceback.print_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2]) return "<b><i>ERROR rendering tile</i></b>"