equal
deleted
inserted
replaced
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 |