Back to index

moin  1.9.0~rc2
wikiconfig.py
Go to the documentation of this file.
00001 # -*- coding: iso-8859-1 -*-
00002 """MoinMoin Desktop Edition (MMDE) - Configuration
00003 
00004 ONLY to be used for MMDE - if you run a personal wiki on your notebook or PC.
00005 
00006 This is NOT intended for internet or server or multiuser use due to relaxed security settings!
00007 """
00008 
00009 import sys, os
00010 
00011 from MoinMoin.config import multiconfig, url_prefix_static
00012 
00013 
00014 class LocalConfig(multiconfig.DefaultConfig):
00015     # vvv DON'T TOUCH THIS EXCEPT IF YOU KNOW WHAT YOU DO vvv
00016     # Directory containing THIS wikiconfig:
00017     wikiconfig_dir = os.path.abspath(os.path.dirname(__file__))
00018 
00019     # We assume this structure for a simple "unpack and run" scenario:
00020     # wikiconfig.py
00021     # wiki/
00022     #      data/
00023     #      underlay/
00024     # If that's not true, feel free to just set instance_dir to the real path
00025     # where data/ and underlay/ is located:
00026     #instance_dir = '/where/ever/your/instance/is'
00027     instance_dir = os.path.join(wikiconfig_dir, 'wiki')
00028 
00029     # Where your own wiki pages are (make regular backups of this directory):
00030     data_dir = os.path.join(instance_dir, 'data', '') # path with trailing /
00031 
00032     # Where system and help pages are (you may exclude this from backup):
00033     data_underlay_dir = os.path.join(instance_dir, 'underlay', '') # path with trailing /
00034 
00035     DesktopEdition = True # give all local users full powers
00036     acl_rights_default = u"All:read,write,delete,revert,admin"
00037     surge_action_limits = None # no surge protection
00038     sitename = u'MoinMoin DesktopEdition'
00039     logo_string = u'<img src="%s/common/moinmoin.png" alt="MoinMoin Logo">' % url_prefix_static
00040     # ^^^ DON'T TOUCH THIS EXCEPT IF YOU KNOW WHAT YOU DO ^^^
00041 
00042     #page_front_page = u'FrontPage' # change to some better value
00043 
00044     # Add your configuration items here.
00045     secrets = 'This string is NOT a secret, please make up your own, long, random secret string!'
00046 
00047 
00048 # DEVELOPERS! Do not add your configuration items there,
00049 # you could accidentally commit them! Instead, create a
00050 # wikiconfig_local.py file containing this:
00051 #
00052 # from wikiconfig import LocalConfig
00053 #
00054 # class Config(LocalConfig):
00055 #     configuration_item_1 = 'value1'
00056 #
00057 
00058 try:
00059     from wikiconfig_local import Config
00060 except ImportError, err:
00061     if not str(err).endswith('wikiconfig_local'):
00062         raise
00063     Config = LocalConfig
00064