Attachment 'wikiconfig.py'
Download 1 # -*- coding: utf-8 -*-
2 """MoinMoin Wiki - Configuration"""
3
4 import sys, os
5
6 from MoinMoin.config.default import DefaultConfig
7 from MoinMoin.storage.backends import create_simple_mapping
8
9
10 class Config(DefaultConfig):
11 # vvv DON'T TOUCH THIS EXCEPT IF YOU KNOW WHAT YOU DO vvv
12 # Directory containing THIS wikiconfig:
13 wikiconfig_dir = os.path.abspath(os.path.dirname(__file__))
14
15 # We assume this structure for a simple "unpack and run" scenario:
16 # wikiconfig.py
17 # wiki/
18 # data/
19 # syspages.xml
20 # If that's not true, feel free to just set instance_dir to the real path
21 # where data/ and syspages.xml is located:
22 # instance_dir = '/where/ever/your/instance/is'
23 instance_dir = os.path.join(wikiconfig_dir, 'wiki')
24 data_dir = os.path.join(instance_dir, 'data') # Note: this used to have a trailing / in the past
25
26 # This puts the contents from the specified xml file (a serialized backend) into your
27 # backend(s). You can remove this after the first request to your wiki or
28 # from the beginning if you don't want to use this feature at all.
29 load_xml = os.path.join(instance_dir, 'preloaded_items.xml')
30 #save_xml = os.path.join(instance_dir, 'saved_items.xml')
31
32 # This provides a simple default setup for your backend configuration.
33 # 'fs:' indicates that you want to use the filesystem backend. You can also use
34 # 'hg:' instead to indicate that you want to use the mercurial backend.
35 # Alternatively you can set up the mapping yourself (see HelpOnStorageConfiguration).
36 namespace_mapping, router_index_uri = create_simple_mapping(
37 backend_uri='fs2:%s/%%(nsname)s' % data_dir,
38 # XXX we use rather relaxed ACLs for the development wiki:
39 content_acl=dict(before=u'',
40 default=u'All:read,write,create,destroy,admin',
41 after=u'', ),
42 user_profile_acl=dict(before=u'',
43 default=u'All:read,write,create,destroy,admin',
44 after=u'', ),
45 )
46
47 sitename = u'My MoinMoin'
48 logo = u'<img src="/static/common/moinmoin.png" id="moin-img-logo" alt="MoinMoin Logo">'
49 stylesheets = [('screen', '/_themes/modernized/css/greenonblack.css', 'Green on Black', True)]
50 # ^^^ DON'T TOUCH THIS EXCEPT IF YOU KNOW WHAT YOU DO ^^^
51
52 #item_root = u'Home' # change to some better value
53
54
55
56 MOINCFG = Config # Flask only likes uppercase stuff
57 # Flask settings - see the flask documentation about their meaning
58 SECRET_KEY = 'you need to change this so it is really secret'
59 #DEBUG = False # use True for development only, not for public sites!
60 #TESTING = False
61 #SESSION_COOKIE_NAME = 'session'
62 #PERMANENT_SESSION_LIFETIME = timedelta(days=31)
63 #USE_X_SENDFILE = False
64 #LOGGER_NAME = 'MoinMoin'
65 #config for flask-cache:
66 #CACHE_TYPE = 'filesystem'
67 #CACHE_DIR = '/path/to/flask-cache-dir'
68
69 # DEVELOPERS! Do not add your configuration items here - you could accidentally
70 # commit them! Instead, create a wikiconfig_local.py file containing this:
71 #
72 #from wikiconfig import *
73 #
74 #class LocalConfig(Config):
75 # configuration_item_1 = 'value1'
76 #
77 #MOINCFG = LocalConfig
78 #DEBUG = True
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.