~ubuntu-branches/ubuntu/natty/moin/natty-updates

« back to all changes in this revision

Viewing changes to wiki/config/wikifarm/farmconfig.py

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Smedegaard
  • Date: 2008-06-22 21:17:13 UTC
  • mto: This revision was merged to the branch mainline in revision 18.
  • Revision ID: james.westby@ubuntu.com-20080622211713-inlv5k4eifxckelr
ImportĀ upstreamĀ versionĀ 1.7.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
#  * the left part must be a valid python module name, so better use only
35
35
#    lower letters "a-z" and "_". Do not use blanks or "-" there!!!
36
36
#  * the right part is the url re, use r"..." for it
 
37
#  * the right part does NOT include "http://" nor "https://" at the beginning
37
38
#  * in the right part ".*" means "everything". Just "*" does not work like
38
39
#    for filenames on the shell / commandline, you must use ".*" as it is a RE.
39
40
#  * in the right part, "^" means "beginning" and "$" means "end"
40
41
 
41
42
wikis = [
 
43
    # Standalone server needs the port e.g. localhost:8000
 
44
    # Twisted server can now use the port, too.
42
45
 
43
 
    # wikiname, url regular expression
 
46
    # wikiname,     url regular expression (no protocol)
44
47
    # ---------------------------------------------------------------
45
48
    ("mywiki", r".*"),   # this is ok for a single wiki
46
49
 
47
50
    # for multiple wikis, do something like this:
48
 
    #("wiki1", r"^http://wiki1\.example\.org/.*$"),
49
 
    #("wiki2", r"^https?://wiki2\.example\.org/.*$"),
 
51
    #("moinmoin",    r"^moinmo.in/.*$"),
 
52
    #("moinmaster",  r"^master.moinmo.in/.*$"),
50
53
]
51
54
 
52
55
 
62
65
# this is to get everything to sane defaults, so we need to change only what
63
66
# we like to have different:
64
67
 
65
 
from MoinMoin.config import multiconfig, url_prefix_static
 
68
from MoinMoin.config.multiconfig import DefaultConfig
66
69
 
67
70
# Now we subclass this DefaultConfig. This means that we inherit every setting
68
71
# from the DefaultConfig, except those we explicitely define different.
69
72
 
70
 
class FarmConfig(multiconfig.DefaultConfig):
 
73
class FarmConfig(DefaultConfig):
71
74
 
72
75
    # Critical setup  ---------------------------------------------------
73
76
 
 
77
    # Misconfiguration here will render your wiki unusable. Check that
 
78
    # all directories are accessible by the web server or moin server.
 
79
 
 
80
    # If you encounter problems, try to set data_dir and data_underlay_dir
 
81
    # to absolute paths.
 
82
 
 
83
    # Where your mutable wiki pages are. You want to make regular
 
84
    # backups of this directory.
 
85
    data_dir = './data/'
 
86
 
 
87
    # Where read-only system and help page are. You might want to share
 
88
    # this directory between several wikis. When you update MoinMoin,
 
89
    # you can safely replace the underlay directory with a new one. This
 
90
    # directory is part of MoinMoin distribution, you don't have to
 
91
    # backup it.
 
92
    data_underlay_dir = './underlay/'
 
93
 
74
94
    # The URL prefix we use to access the static stuff (img, css, js).
75
 
    # Note: moin runs a static file server at url_prefix_static path (relative
76
 
    # to the script url).
77
 
    # If you run your wiki script at the root of your site (/), just do NOT
78
 
    # use this setting and it will automatically work.
79
 
    # If you run your wiki script at /mywiki, you need to use this:
80
 
    #url_prefix_static = '/mywiki' + url_prefix_static
81
 
    # If you need different url_prefix_static setups for your wikis,
82
 
    # you'll have to do it in each wiki's config.
 
95
    # NOT touching this is maybe the best way to handle this setting as moin
 
96
    # uses a good internal default (something like '/moin_static170' for moin
 
97
    # version 1.7.0).
 
98
    # For Twisted and standalone server, the default will automatically work.
 
99
    # For others, you should make a matching server config (e.g. an Apache
 
100
    # Alias definition pointing to the directory with the static stuff).
 
101
    #url_prefix_static = '/moin_static170'
 
102
 
83
103
 
84
104
    # Security ----------------------------------------------------------
85
105