-
-
Notifications
You must be signed in to change notification settings - Fork 58
/
Copy pathwikiconfig.py
71 lines (55 loc) · 2.67 KB
/
wikiconfig.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# -*- coding: iso-8859-1 -*-
"""MoinMoin Desktop Edition (MMDE) - Configuration
ONLY to be used for MMDE - if you run a personal wiki on your notebook or PC.
This is NOT intended for internet or server or multiuser use due to relaxed security settings!
"""
import sys, os
from MoinMoin.config import multiconfig, url_prefix_static
class LocalConfig(multiconfig.DefaultConfig):
# vvv DON'T TOUCH THIS EXCEPT IF YOU KNOW WHAT YOU DO vvv
# Directory containing THIS wikiconfig:
wikiconfig_dir = os.path.abspath(os.path.dirname(__file__))
# We assume this structure for a simple "unpack and run" scenario:
# wikiconfig.py
# wiki/
# data/
# underlay/
# If that's not true, feel free to just set instance_dir to the real path
# where data/ and underlay/ is located:
#instance_dir = '/where/ever/your/instance/is'
instance_dir = os.path.join(wikiconfig_dir, 'wiki')
# Where your own wiki pages are (make regular backups of this directory):
data_dir = os.path.join(instance_dir, 'data', '') # path with trailing /
# Where system and help pages are (you may exclude this from backup):
data_underlay_dir = os.path.join(instance_dir, 'underlay', '') # path with trailing /
DesktopEdition = True # give all local users full powers (every user is superuser)
# The newaccount action is by default only enabled for superusers because
# spammers abuse it.
# You can create wiki users on the shell by using "moin account create".
# A superuser also can use "Settings" -> "Switch user" to create users.
# If you need the newaccount action, you can (temporarily) enable it:
actions_superuser = multiconfig.DefaultConfig.actions_superuser[:]
actions_superuser.remove('newaccount')
acl_rights_default = u"All:read,write,delete,revert,admin"
surge_action_limits = None # no surge protection
sitename = u'MoinMoin DesktopEdition'
logo_string = u'<img src="%s/common/moinmoin.png" alt="MoinMoin Logo">' % url_prefix_static
# ^^^ DON'T TOUCH THIS EXCEPT IF YOU KNOW WHAT YOU DO ^^^
#page_front_page = u'FrontPage' # change to some better value
# Add your configuration items here.
secrets = 'This string is NOT a secret, please make up your own, long, random secret string!'
# DEVELOPERS! Do not add your configuration items there,
# you could accidentally commit them! Instead, create a
# wikiconfig_local.py file containing this:
#
# from wikiconfig import LocalConfig
#
# class Config(LocalConfig):
# configuration_item_1 = 'value1'
#
try:
from wikiconfig_local import Config
except ImportError, err:
if not str(err).endswith('wikiconfig_local'):
raise
Config = LocalConfig