views:

347

answers:

4

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

+1  A: 

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).

Greg Hewgill
OP queried in reference to a Django-based app. ikiwiki is written in Perl.
Jeff Bauer
That's true, but I was referring the the principle of storing page revisions in a VCS, not as a "here, use this" answer. Ikiwiki is an *example* of such a system that does what the OP wants. Perhaps the OP could learn something from studying how Ikiwiki works.
Greg Hewgill
Thanks for the suggestion Greg, I'll take a look at how they implement it.
Karan
+1  A: 

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.

Paul
A: 

Hi,

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,

Tiago
+2  A: 

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.
Jakub Narębski