cubicweb/pyramid/core.py
changeset 12036 4c2c731f9190
parent 12028 08c866d2f11d
child 12043 b8d2e6b9f548
equal deleted inserted replaced
12035:2fcb9339f69a 12036:4c2c731f9190
   293     track of opened sessions, removing the need of closing them"""
   293     track of opened sessions, removing the need of closing them"""
   294     user, lang = tools.cached_build_user(repo, eid)
   294     user, lang = tools.cached_build_user(repo, eid)
   295     session = Session(request, user, repo)
   295     session = Session(request, user, repo)
   296     session._cached_lang = lang
   296     session._cached_lang = lang
   297     tools.cnx_attach_entity(session, user)
   297     tools.cnx_attach_entity(session, user)
   298     # Calling the hooks should be done only once, disabling it completely for
       
   299     # now
       
   300     # with session.new_cnx() as cnx:
       
   301     #     repo.hm.call_hooks('session_open', cnx)
       
   302     #     cnx.commit()
       
   303     return session
   298     return session
   304 
   299 
   305 
   300 
   306 def _cw_session(request):
   301 def _cw_session(request):
   307     """Obtains a cw session from a pyramid request
   302     """Obtains a cw session from a pyramid request