view.py
branchtls-sprint
changeset 1723 30c3a713ab61
parent 1511 514e4e53a3c7
child 1756 42d87dedd631
equal deleted inserted replaced
1722:62f3fefb22f4 1723:30c3a713ab61
   123         self.w = w
   123         self.w = w
   124         return stream
   124         return stream
   125 
   125 
   126     # main view interface #####################################################
   126     # main view interface #####################################################
   127 
   127 
   128     def dispatch(self, w=None, **context):
   128     def render(self, w=None, **context):
   129         """called to render a view object for a result set.
   129         """called to render a view object for a result set.
   130 
   130 
   131         This method is a dispatched to an actual method selected
   131         This method is a dispatched to an actual method selected
   132         according to optional row and col parameters, which are locating
   132         according to optional row and col parameters, which are locating
   133         a particular row or cell in the result set:
   133         a particular row or cell in the result set:
   147         # stream = self.set_stream(context)
   147         # stream = self.set_stream(context)
   148         view_func(**context)
   148         view_func(**context)
   149         # return stream content if we have created it
   149         # return stream content if we have created it
   150         if stream is not None:
   150         if stream is not None:
   151             return self._stream.getvalue()
   151             return self._stream.getvalue()
       
   152 
       
   153     dispatch = obsolete('.dispatch is deprecated, use .render')(render)
   152 
   154 
   153     # should default .call() method add a <div classs="section"> around each
   155     # should default .call() method add a <div classs="section"> around each
   154     # rset item
   156     # rset item
   155     add_div_section = True
   157     add_div_section = True
   156 
   158