信息结构
原能力
梳理主信息、支持材料、优先顺序和不同渠道需要的版本。(细化版 p.6–7)
首选项目
Wagtail(BSD-3-Clause)。 Wagtail
匹配范围
CMS 页面和内容块管理主信息、证据与版本。
源码
Wagtail · class StreamBlock(BaseStreamBlock
wagtail/blocks/stream_block.py · 509–522 行。 在 GitHub 查看源码 · 许可证与声明
源码片段
class StreamBlock(BaseStreamBlock, metaclass=DeclarativeSubBlocksMetaclass):
pass
class StreamValue(MutableSequence):
"""
Custom type used to represent the value of a StreamBlock; behaves as a sequence of BoundBlocks
(which keep track of block types in a way that the values alone wouldn't).
"""
class StreamChild(BoundBlock):
"""
Iterating over (or indexing into) a StreamValue returns instances of StreamChild.
These are wrappers for the individual data items in the stream, extending BoundBlock
Wagtail · def save_revision(
wagtail/models/revisions.py · 384–397 行。 在 GitHub 查看源码 · 许可证与声明
源码片段
def save_revision(
self,
user=None,
approved_go_live_at=None,
changed=True,
log_action=False,
previous_revision=None,
clean=True,
overwrite_revision=None,
):
"""
Creates and saves a revision.
:param user: The user performing the action.
实现与验收要点
内容优先级、主张检查、按渠道输出不同表达。