cubicweb/pyramid/session.py
changeset 11993 07af2c2c264b
parent 11967 83739be20fab
child 12108 1a5fc93c81db
equal deleted inserted replaced
11992:fa1837a85708 11993:07af2c2c264b
   185     Usually called via ``config.include('cubicweb.pyramid.auth')``.
   185     Usually called via ``config.include('cubicweb.pyramid.auth')``.
   186 
   186 
   187     See also :ref:`defaults_module`
   187     See also :ref:`defaults_module`
   188     """
   188     """
   189     settings = config.registry.settings
   189     settings = config.registry.settings
   190     secret = settings.get('cubicweb.session.secret', '')
   190     try:
   191     if not secret:
   191         secret = settings['cubicweb.session.secret']
   192         secret = config.registry['cubicweb.config'].get('pyramid-session-secret')
   192     except KeyError:
   193         warnings.warn('''
       
   194         Please migrate pyramid-session-secret from
       
   195         all-in-one.conf to cubicweb.session.secret config entry in
       
   196         your pyramid.ini file.
       
   197         ''')
       
   198     if not secret:
       
   199         secret = 'notsosecret'
   193         secret = 'notsosecret'
   200         warnings.warn('''
   194         warnings.warn('''
   201 
   195 
   202             !! WARNING !! !! WARNING !!
   196             !! WARNING !! !! WARNING !!
   203 
   197