I built a proto-wiki in Django as an exercise for learning how to make a custom template filter. It’s absurdly easy, it turns out. Per the docs I added a templatetags module; here’s all the code in it – wikitags.py:
from django.core import template
register = template.Library()
@register.filter
def wikify(value):
"Makes WikiWords"
import re
wikifier = re.compile(r'\b(([A-Z]+[a-z]+){2,})\b')
return wikifier.sub(r'<a href="/\1/">\1</a>', value)
Then, in my page template:
{% load wikitags %}
<h1>{{ page.title }}</h1>
<div class="body">
{{ page.content|wikify }}
</div>
...
I wrote about 60 lines of Python code in total. There are much smaller wiki engines, of course, but given the flexibility and expandability offered by Django I think that’s pretty good.