Django-cms 和编辑工作流程

发布于 2024-12-26 03:25:16 字数 264 浏览 1 评论 0原文

我需要在工作中在 Django-CMS 应用程序中实现工作流程。但从 Django-CMS 功能列表中,我们可以看到:

编辑工作流程

发布和审批的工作流程。

我试图寻找它,但没有找到任何东西。我搜索了 Django-CMS 文档(http://docs.django-cms.org/en/latest/index.html),但也找不到任何内容。

有谁知道 Django-CMS 中的工作流程(特别是页面系统)?

I need to implement workflows in my Django-CMS application at work. But form the Django-CMS feature list, we can read:

Editorial workflow

Workflows for publishing and approval.

I tried to search for it and didn't find anything. I've search the Django-CMS documentation (http://docs.django-cms.org/en/latest/index.html) and couldn't find something there either.

Does anyone has a clue about Workflows in Django-CMS (especially for the pages system) ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

神魇的王 2025-01-02 03:25:16

2016 年更新:

django CMS 3 中还没有编辑工作流程

django CMS 3(截至今天的 v3.3.2)没有编辑工作流程。此功能在 2.3 版本中被删除,并被“简单发布”的概念所取代(内容的 2 个版本:草稿、公开)。阅读相关博文 来自 Divio 的动力。

对于 3.5 版本,计划通过插件提供一些扩展的审核支持,如 Angelo Dini 在 2012 年原始博客文章的当前评论中解释了。不要打赌不过,关于它。

控制编辑

如果您至少想要对编辑进行一些控制,例如“仅允许某些用户创建和编辑,但不能发布更改”,那么您很幸运。它的工作原理如下:

对编辑的控制遵循以下公式,它是三件事的组合

“员工”状态+应用权限+CMS权限

前两个是简单的 Django 概念(来自 django.contrib.auth,请参阅 Django 文档),后者来自 来自 django CMS。这三个功能一起使用,原因如下:

  • 如果没有“员工”状态,则根本不允许进行编辑,也不会显示用于前端编辑的 CMS 工具栏。请注意,此状态不能在组上设置,必须在单个用户上设置。 (天啊!)
  • 如果没有将所有应用权限(cms、djangocms-、cmsplugin-、zinnia)分配给组(或直接用户),则无法进行编辑;将显示 CMS 工具栏,您通常可以双击内容来启动编辑,但 django CMS 会告诉您没有权限。
  • 省略某些CMS 权限(例如创建、发布)会禁用 CMS 工具栏上的按钮。就是这样。没有消息指示用户做什么或解释正在发生的事情(承认,这里很难提供通用解决方案),也没有发送电子邮件或其他通知(当然,不存在编辑工作流程之类的东西) 。

IOW,可以将用户分成组并允许他们只执行一些特定的操作(仅编辑、仅发布等),但是用户通知(工作流实现的核心概念)在 django CMS v3 中不可用。 3.

编辑:请参阅“django 的编辑工作流程CMS”,位于 django CMS 开发人员 G+ 组,了解详细信息和相关实现的演示。

An update for 2016:

No Editorial Workflow in django CMS 3 (yet)

django CMS 3 (v3.3.2 as of today) has no editorial workflow. This feature was removed in version 2.3, and replaced by the concept of "simple publishing" (2 versions of content: draft, public). Read the related blog post from Divio for their motivation.

For version 3.5 there is some extended moderation support planned via an addon, as explained by Angelo Dini in a current comment on the original blog post from 2012. Don't bet on it, though.

Control over Editing

If what you want is, at least, some control over editing, e.g. "some users are allowed to create and edit only but can't publish changes", then you're in luck. It works as follows:

Control over editing goes with the following formula, it's a combination of 3 things:

"Staff" status + App permissions + CMS permissions

The first two are plain Django concepts (from django.contrib.auth, see the Django docs) and the latter comes from django CMS. All 3 play together, here's why:

  • Without "Staff" status no editing is allowed at all, no CMS toolbar for front-end editing is shown either. Note that this status cannot be set on a group, it must be set on individual users. (d'oh!)
  • Without all app permissions (cms, djangocms-, cmsplugin-, zinnia) assigned to the group (or user directly) there is no editing; the CMS toolbar will be shown and you can typically double-click on content to initiate editing, but django CMS will tell you that you have no permission.
  • Omitting some of the CMS permissions (e.g. create, publish) disables the buttons on the CMS toolbar. That's about it. There is no message instructing the user what to do or explanation about what is happening (acknowledged, it's difficult to provide a generic solution here), neither are emails or other notifications sent (of course, there is no such thing as an editorial workflow).

IOW, it's possible to split your users into groups and allow them to do just some specific things (editing only, publishing only, etc.), but the user notifications, a central concept to workflow implementions, are not available in django CMS v3.3.

EDIT: See "Editorial workflow for django CMS" in the django CMS developers G+ group for details and a demo of a related implementation.

顾铮苏瑾 2025-01-02 03:25:16

当您在 Django-CMS 中打开 CMS_MODERATION 时,您将在页面列表视图中每个页面旁边看到三个图标。从左到右,这些控制

  • 对此页面的更改是否需要主持人批准
  • 对此页面的子页面的更改是否需要主持人批准
  • 对此页面的后代的更改是否需要主持人批准

当您创建或更改页面时,您将能够保存并在您的网站上预览该页面或该页面的新版本,但在该页面或该页面的新版本对最终用户可见之前,需要版主批准。

When you turn on CMS_MODERATION in Django-CMS, you will get three icons next to each page in the page list view. From left to right, these control

  • whether changes to this page will require moderator approval
  • whether changes to this page's children will require moderator approval
  • whether changes to this page's descendents will require moderator approval

When you create or change a page, you will be able to save it, and preview the page or new version of the page on your site, but it will require moderator approval before the page or new version of the page is visible to end users.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文