cubicweb框架的类roundup nosylist组件
cubicweb-nosylist的Python项目详细描述
摘要
此多维数据集提供了可用于通知用户事件的八卦列表“a la roundup” 他们订阅了内容修改、状态更改等内容。
多管闲事的列表是一个特殊的实体邮件列表,用户可以在其中 注册,或在某个操作上自动注册。
用法
要使用此多维数据集:
添加到架构:
CWUser interested_in X X nosy_list CWUser
其中x是被视为通知基的实体类型,例如控制 有关X的事件将通知谁。
配置应在哪个关系上传播nosy列表
fromcubes.nosylistimporthooksasnosylist_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 relationnosylist_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 relationnosylist_hooks.O_RELS|=set(('for_version','comments'))
当需要时(例如,当 用户正在向实体添加评论,请将其添加到实体的八卦列表中)
定义您的通知视图/钩子,它应该依赖于默认的 Recipients Finder Mecanism获取通知用户(如果使用 cubicweb基类)