使用Git实现面向社区的网站内容修改系统

发布于 2024-07-11 20:49:13 字数 503 浏览 6 评论 0原文

我正在开发一个基于 Django 的 Web 应用程序,其中社区为网站上的内容提供支持,就像 wiki 一样。 内容采用 HTML 形式,用户可以完全自由地分叉文章/章节或对现有文章/章节进行自己的修改并将其添加到当前的“工作版本”中。 每篇文章/章节的维护者(原作者)将可以选择接受这些更改。

我们还计划维护任何给定文章的两个版本(或至少是视图):作者批准的编辑版本和基于社区的免费编辑版本。

在详细历史记录之上管理所有这些分叉、合并和分支的修订系统开始听起来很像源修订系统的作用。 所以我正在考虑使用 Git 来管理这些修订。

我对那些在此类事情上比我更有经验的人提出的问题是:

  • 值得付出努力吗?之后,它会比在 RDBMS 中推出某些东西更好吗?

  • 如果是这样,粗略地说,我应该如何使用 Django/Python 来实现这个?

    如果是这样,粗略

再次询问希望得到更多回复,这对我很重要

I'm working on a Django-based web app in which the community fuels the content on the site, much like a wiki. Content is in the form of HTML, and users have total freedom to fork articles/chapters or make their own modifications to existing ones and add them to the current 'working version'. The maintainer of each article/chapter (the original authors[s]), will have the option of accepting these changes.

We're also planning on maintaining two versions - or at least views - of any given article: the author-approved edits version and the free-for-all community based edits version.

The revision system that would manage all this forking, merging and branching on top of detailed histories is starting to sound a lot like what a source revision system does. So I'm considering using Git to manage these revisions.

My question to those more experienced in this type of thing than I:

  • Is it worth the effort and after that, will it be better than rolling something out in a RDBMS?

  • And if so, roughly, how should I go about implementing this with Django/Python?

asked again in hopes of catching more replies, this is very important to me

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

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

发布评论

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

评论(5

愚人国度 2024-07-18 20:49:13

我不知道任何Django模块可以提供你想要的东西(至少wiki ie可编辑文本具有一些轻量级markip语言,加上版本控制系统),但你可以看看InterfacesFrontendsAndTools Git Wiki 页面,“Wiki、博客等”部分。 除此之外,您还可以在那里找到:

I don't know any Django module which would offer what you want (at least wiki i.e. editable text with some lightweight markip language, coupled with version control system), but you can take a look at InterfacesFrontendsAndTools page at Git Wiki, section "Wikis, blogs, etc.". Among others you can find there:

  • wikiri: simple, single-file wiki written in Python, with optional git support for history tracking
  • Chuyen: a weblog software written in Python, using the Django web framework and Git as its data storage backend through PyGit
  • Pystl: very simple, small blog engine in Python, using Git for version control.
空城缀染半城烟沙 2024-07-18 20:49:13

您可以考虑了解 ikiwiki 的工作原理。 这是一个简单的 wiki 系统,可以由真正的版本控制系统支持(我将它与 Git 存储库一起使用)。

You might consider looking at how ikiwiki works. It's a simple wiki system that can be backed by a real version control system (I use it with a Git repository).

蛮可爱 2024-07-18 20:49:13

GitPython 是一个与 Git 存储库交互的 Python 库。 我已经玩过它,但没有在生产中使用它。 它看起来很可靠并且相对易于使用,并且正在积极开发中。

如果您在将 Git 与 Django 项目集成时遇到困难,您可以考虑 Mercurial。 我非常喜欢 Git,它具有优雅且强大的数据模型,但 Mercurial 提供了与 Git 类似的功能,并且它是用 python 编写的,因此对您来说可能更容易。

GitPython is a python library that interacts with Git repositories. I've played around with it, but not used it in production. It seems solid and relatively easy to use, and is under active development.

If you have difficulties integrating Git with your Django project, you might look at Mercurial. I strongly prefer Git, with its elegant and powerful data model, but Mercurial offers functionality similar to Git and it is written in python, so it might be easier for you.

林空鹿饮溪 2024-07-18 20:49:13

django-rcsfield 可能会有所帮助。 它是 Django Web 框架的一个字段(如 models.TextField),在底层对其内容进行版本化。 名称中的“rcs”是修订控制系统的缩写。

http://code.google.com/p/django-rcsfield/

django-rcsfield might be helpful. It is a field (like models.TextField) for the Django web framework which - under the hood - versionizes its content. The 'rcs' in the name is short for revision control system.

http://code.google.com/p/django-rcsfield/

把回忆走一遍 2024-07-18 20:49:13

我刚刚在 reddit 上看到了这个:

https://launchpad.net/django-wikiapp/

Django WikiApp 是一个可插入的
Django 的应用程序旨在
提供完整的Wiki(对于真正的
“完整”的小值)。

嗨,

I've just seen this on reddit:

https://launchpad.net/django-wikiapp/

Django WikiApp is a pluggable
application for Django that aims to
provide a complete Wiki (for really
small values of "complete").

HIH,

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