跳转到主要内容

将'pyramid'命令添加到cubicweb-ctl

项目描述

将‘pyramid’命令添加到cubicweb-ctl”。

此立方体还添加了一个CWSession实体类型,以便会话可以存储在数据库中,这使得无需设置会话存储(如redis或memcache)解决方案即可运行Cubicweb实例。

然而,对于生产系统,强烈建议使用此类存储解决方案来存储会话。

会话处理由pyramid完成(有关更多详细信息,请参阅pyramid关于会话的文档)。

例如,要设置基于redis的会话存储,您需要pyramid-redis-session包,然后您必须配置pyramid使用此后端,通过配置实例配置目录中的pyramid.ini文件(在all-in-one.conf文件附近)

[main]
cubicweb.defaults = no # we do not want to load the default cw session handling

cubicweb.auth.authtkt.session.secret = <secret1>
cubicweb.auth.authtkt.persistent.secret = <secret2>
cubicweb.auth.authtkt.session.secure = yes
cubicweb.auth.authtkt.persistent.secure = yes

redis.sessions.secret = <secret3>
redis.sessions.prefix = <my-app>:

redis.sessions.url = redis://localhost:6379/0

pyramid.includes =
        pyramid_redis_sessions
        pyramid_cubicweb.auth
        pyramid_cubicweb.login

有关更多详细信息,请参阅Pyramid CubicWeb的文档。

机密信息

pyramid.ini 中有许多机密信息需要配置。它们应该彼此不同,如 Pyramid 文档 中所述。

记录在案

cubicweb.session.secret:

此机密用于加密使用集成(基于 CWSession 的)会话数据存储时会话数据 ID(数据本身存储在后端、数据库或 Redis 中)。

redis.session.secret:

此机密用于加密使用 Redis 作为后端时会话数据 ID(数据本身存储在后端、数据库或 Redis 中)。

cubicweb.auth.authtkt.session.secret:

此机密用于加密认证cookie。

cubicweb.auth.authtkt.persistent.secret:

此机密用于加密持久认证cookie。

项目详情


下载文件

下载适用于您的平台的文件。如果您不确定选择哪个,请了解更多关于 安装包 的信息。

源代码发行版

cubicweb-pyramid-0.5.0.tar.gz (10.7 kB 查看哈希值)

上传时间 源代码

由以下机构支持