类似于 nosylist 组件的 CubicWeb 框架的 roundup
项目描述
摘要
此立方体提供类似于 nosy-list 的“roundup”,可用于通知用户其订阅的事件,例如内容修改、状态更改等。
Nosy list 是一种临时的邮件列表,用户可以注册或自动注册某些操作。
用法
要使用此立方体
将其添加到您的模式中
CWUser interested_in X X nosy_list CWUser
其中 X 是作为通知基础的实体类型,例如控制哪些人将收到与 X 相关的事件通知。
配置应传播 nosy list 的关系
from cubes.nosylist import hooks as nosylist_hooks # relations where the "main" entity (eg holding the reference nosy list, so # should be in one `X` types cited above) is the subject of the relation nosylist_hooks.S_RELS |= set(('documented_by', 'attachment', 'screenshot')) # relations where the "main" entity (eg holding the reference nosy list, so # should be in one `X` types cited above) is the object of the relation nosylist_hooks.O_RELS |= set(('for_version', 'comments'))
编写钩子,在需要时将用户添加到 nosy list 中(例如,当用户向实体添加评论时,将其添加到实体的 nosy list 中)
定义您的通知视图/钩子,应依赖于默认的接收者查找机制来获取通知用户(如果使用 CubicWeb 基类,则为自动)
项目详情
下载文件
下载适合您的平台的文件。如果您不确定选择哪个,请了解更多关于 安装包 的信息。
源代码分发
cubicweb-nosylist-1.0.0.tar.gz (14.1 kB 查看哈希值)
构建版本
关闭
cubicweb-nosylist-1.0.0.tar.gz 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 6407934d1e367630582016c3ff777714fe6c0664842f0bc33e5c657c2c0eaac2 |
|
MD5 | 4ecb26d77a0fa3c8e77e5967a81fb273 |
|
BLAKE2b-256 | 9d343228c922d07a0c0aec33a1eafcc6d478939e2b9cb6bc84dc035d04a251b5 |
关闭
cubicweb_nosylist-1.0.0-py3-none-any.whl 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 1ede7b899ab9abb26db7c854541c8d5769fe9a6b734c261eb2f0806f4f5f4be7 |
|
MD5 | 52f7a7a92ef7238d5c27c8fcdd4d2998 |
|
BLAKE2b-256 | 4fdf295ef84e93d5d059e083d1035d76308f2415f786bb4e3abab9f28f96b533 |