dbapi.py
branchstable
changeset 8238 087bb529035c
parent 7962 38ce8b8a980f
child 8239 c6cdd060212e
equal deleted inserted replaced
8235:c2a91d6639d8 8238:087bb529035c
   382         req.set_session(self.session, user)
   382         req.set_session(self.session, user)
   383         return req
   383         return req
   384 
   384 
   385     @deprecated('[3.8] use direct access to req.session.data dictionary')
   385     @deprecated('[3.8] use direct access to req.session.data dictionary')
   386     def session_data(self):
   386     def session_data(self):
   387         """return a dictionnary containing session data"""
   387         """return a dictionary containing session data"""
   388         return self.session.data
   388         return self.session.data
   389 
   389 
   390     @deprecated('[3.8] use direct access to req.session.data dictionary')
   390     @deprecated('[3.8] use direct access to req.session.data dictionary')
   391     def get_session_data(self, key, default=None, pop=False):
   391     def get_session_data(self, key, default=None, pop=False):
   392         if pop:
   392         if pop:
   657     @check_not_closed
   657     @check_not_closed
   658     def get_shared_data(self, key, default=None, pop=False, txdata=False):
   658     def get_shared_data(self, key, default=None, pop=False, txdata=False):
   659         """return value associated to key in the session's data dictionary or
   659         """return value associated to key in the session's data dictionary or
   660         session's transaction's data if `txdata` is true.
   660         session's transaction's data if `txdata` is true.
   661 
   661 
   662         If pop is True, value will be removed from the dictionnary.
   662         If pop is True, value will be removed from the dictionary.
   663 
   663 
   664         If key isn't defined in the dictionnary, value specified by the
   664         If key isn't defined in the dictionary, value specified by the
   665         `default` argument will be returned.
   665         `default` argument will be returned.
   666         """
   666         """
   667         return self._repo.get_shared_data(self.sessionid, key, default, pop, txdata)
   667         return self._repo.get_shared_data(self.sessionid, key, default, pop, txdata)
   668 
   668 
   669     @check_not_closed
   669     @check_not_closed