like a personal project I'm attempting to write a wiki with the aid of django. I am a beginner if this involves web design. I'm in the (early) point where I have to select how to keep the wiki sites. I've three approaches in your mind and want to know your suggestion.

Flat files

I considered a set file approach having a version control system like git or mercurial. First of all, I'd possess some example wikis to check out like http://hatta.sheep.art.pl/. Next, the vcs would most likely cope with editing conflicts and keeping the edit history, so I wouldn't need to reinvent the wheel. And third, I possibly could most likely easily clone the wiki repository, and so i (or for your matter others) might have an offline copy from the wiki.

However, so far as I understand, I am unable to use django models with flat files. Then, basically added fields to some wiki site, just like a category, I will have to in some way have a mention of the that flat file to be able to connect the fields within the database using the flat file. Besides, I'm not sure whether it may be beneficial to possess all of the wiki sites in a single repository. I imagine it's natural to possess type of just like a repository per wiki site resp. file. Finally, I am unsure, however i think using flat files would limit my implementing abilities because web hosting companies maybe do not let creating files (I am thinking, for instance, of Google Application Engine)

Storing inside a database

By storing the wiki sites within the database I'm able to utilize django models and connect arbitrary fields using the wiki site. I most likely would also provide an simpler existence implementing the wiki. But I wouldn't get vcs features like background and conflict solving by itself. I looked for django-extensions that helped me to and that i found django-reversion. However, I don't completely understand whether it fit me. Will it track model changes like for instance basically alter the django model file, or will it track this content from the models (which may fit my need). Plus, I don't find out if django reversion is needed me with edit conflicts.

Storing a vcs repository inside a database area

This is my ideal solution. It might mix the benefits of both previous approaches with no disadvantages. That's I'd have vcs features however i would save the wiki sites inside a database. The issue is: I've no clue how achievable that's. I simply imagine saving a wiki site/source plus a git/mercurial repository inside a database area. Yet, I in some way doubt database fields work like this.

So, I am open for just about any other approaches but this is exactly what I emerged with. Also, if you are interested, you'll find the crappy early test I am focusing on here http://github.com/eugenkiss/instantwiki-test

In none of the options have you thought about whether you want to have the ability to search your wiki. If this sounds like considered, getting the 'live' copy of every page inside a database with full text search could be greatly advantageous. Because of this, I'd personally opt for storing the web pages inside a database each time - otherwise you will need to make your own index somewhere.

So far as version logging goes, you simply need keep live copy within an indexable format. You can instantly produce a history item in your 'page' model when an transformed page is written to the database. You are able to cut lower around the storage overhead of earlier page revisions by blending the information, if this should become necessary.

If you are expecting an enormous quantity of change logging, you might like to look at this answer here:

How does one store history of edits effectively?

Developing a wiki is fun and rewarding, but you will find lots of prebuilt wiki software programs already. I would recommend Wikipedia's List of wiki software. Particularly, MoinMoin and Trac are great. Finally, John Sutherland makes a wiki using Django.