Configuration of multiple wikis with MoinMoin DesktopEdition

MoinMoin DesktopEdition is a very easy to install personal wiki.

One issue I had was how to configure it to allow it to support multiple wikis.

The following steps makes it happen:

  1. From the download page the the zip version of the DesktopEdition.
  2. Then follow the rest of the installation instructions and confirm the default config is working.
  3. Down load and expand the normal version moin-1.3.5.tar.gz.
  4. From the normal version copy MoinMoin/multiconfig.py to your installed DesktopEdition. This is the main bit of magic needed as the multiconfig.py in the DesktopEdition does not know about multiple wikis.
  5. In the DesktopEdition root direcotry (the one with moin.py) create you farmconfig.py and persowiki.py files (see below for examples).
  6. Edit you hosts file to include a mapping for each wiki you want.

farmconfig.py
wikis = [
# wikiname, url regular expression (no protocol)
# Standalone server needs the port e.g. localhost:8000
# Twisted server can now use the port, too.
("persowiki", r"^.*persowiki.*$"),
("testwiki", r"^.*testwiki.*$"),
]

persowiki.py
# -*- coding: iso-8859-1 -*-

from MoinMoin.multiconfig import DefaultConfig

class Config(DefaultConfig):

sitename = u'CswWiki' # u means that it will be converted to Unicode
interwikiname = ''
data_dir = 'wiki/persowiki/data/'
data_underlay_dir = 'wiki/underlay'

testwiki.py
# -*- coding: iso-8859-1 -*-

from MoinMoin.multiconfig import DefaultConfig

class Config(DefaultConfig):

sitename = u'Test Wiki' # u means that it will be converted to Unicode
interwikiname = 'testwiki'
data_dir = 'wiki/data/'
data_underlay_dir = 'wiki/underlay'

hosts
127.0.0.1 persowiki
127.0.0.1 testwiki