cubicweb/pyramid/pyramid.ini
author Arthur Lutz <arthur.lutz@logilab.fr>
Fri, 27 Jan 2017 15:06:55 +0100
changeset 113 e7bdd07a067a
parent 100 6e900481b0d2
child 118 28a570c2654a
permissions -rw-r--r--
[cubicweb/pyramid] add redis support in pyramid.ini

[main]
cubicweb.includes =
    cubicweb.pyramid.auth
    cubicweb.pyramid.login
{% for include in config.pyramid.includes|default((), true)  %}
    {{ include }}
{% endfor %}

cubicweb.profile = no
cubicweb.session.secret = {{ config.pyramid.session_secret }}
cubicweb.auth.authtkt.session.secret = {{ config.pyramid.authtk_session_secret }}
cubicweb.auth.authtkt.session.secure = False
cubicweb.auth.authtkt.persistent.secret = {{ config.pyramid.authtk_persistent_secret }}
cubicweb.auth.authtkt.persistent.secure = False

{% if 'redis_sessions_secret' in config.pyramid and config.pyramid.redis_sessions_secret %}
redis.sessions.secret = {{ config.pyramid.redis_sessions_secret }}
redis.sessions.timeout = 1200
redis.sessions.prefix = {{ config.pyramid.get('redis_prefix', 'cw') }}:
redis.sessions.url = {{ config.pyramid.get('redis_url', 'redis://localhost:6379/0') }}
#redis.sessions.serialize = json.dumps
#redis.sessions.deserialize = json.loads
{% endif %}