當前位置: 首頁>>代碼示例>>Python>>正文


Python Session.flush方法代碼示例

本文整理匯總了Python中calypso.model.meta.Session.flush方法的典型用法代碼示例。如果您正苦於以下問題:Python Session.flush方法的具體用法?Python Session.flush怎麽用?Python Session.flush使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在calypso.model.meta.Session的用法示例。


在下文中一共展示了Session.flush方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: delete

# 需要導入模塊: from calypso.model.meta import Session [as 別名]
# 或者: from calypso.model.meta.Session import flush [as 別名]
 def delete(self):
     """
     Remove from database
     """
     if self.dao != None:
         sqlsession.flush()
         sqlsession.delete(self.dao)
         sqlsession.commit()
         del self.dao
開發者ID:lonefeifei,項目名稱:Team-Works,代碼行數:11,代碼來源:properties.py

示例2: delete

# 需要導入模塊: from calypso.model.meta import Session [as 別名]
# 或者: from calypso.model.meta.Session import flush [as 別名]
 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=[]
開發者ID:lonefeifei,項目名稱:Team-Works,代碼行數:12,代碼來源:tiles.py

示例3: render_html

# 需要導入模塊: from calypso.model.meta import Session [as 別名]
# 或者: from calypso.model.meta.Session import flush [as 別名]
 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')
開發者ID:lonefeifei,項目名稱:Team-Works,代碼行數:14,代碼來源:windows.py

示例4: render_html

# 需要導入模塊: from calypso.model.meta import Session [as 別名]
# 或者: from calypso.model.meta.Session import flush [as 別名]
 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>"
開發者ID:lonefeifei,項目名稱:Team-Works,代碼行數:25,代碼來源:tiles.py


注:本文中的calypso.model.meta.Session.flush方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。