Back to index

moin  1.9.0~rc2
farmconfig.py
Go to the documentation of this file.
00001 # -*- coding: iso-8859-1 -*-
00002 # IMPORTANT! This encoding (charset) setting MUST be correct! If you live in a
00003 # western country and you don't know that you use utf-8, you probably want to
00004 # use iso-8859-1 (or some other iso charset). If you use utf-8 (a Unicode
00005 # encoding) you MUST use: coding: utf-8
00006 # That setting must match the encoding your editor uses when you modify the
00007 # settings below. If it does not, special non-ASCII chars will be wrong.
00008 
00009 """
00010     MoinMoin - Configuration for a wiki farm
00011 
00012     If you run a single wiki only, you can keep the "wikis" list "as is"
00013     (it has a single rule mapping all requests to mywiki.py).
00014 
00015     Note that there are more config options than you'll find in
00016     the version of this file that is installed by default; see
00017     the module MoinMoin.config.multiconfig for a full list of names and their
00018     default values.
00019 
00020     Also, the URL http://moinmo.in/HelpOnConfiguration has
00021     a list of config options.
00022 """
00023 
00024 
00025 # Wikis in your farm --------------------------------------------------
00026 
00027 # If you run multiple wikis, you need this list of pairs (wikiname, url
00028 # regular expression). moin processes that list and tries to match the
00029 # regular expression against the URL of this request - until it matches.
00030 # Then it loads the <wikiname>.py config for handling that request.
00031 
00032 # Important:
00033 #  * the left part is the wikiname enclosed in double quotes
00034 #  * the left part must be a valid python module name, so better use only
00035 #    lower letters "a-z" and "_". Do not use blanks or "-" there!!!
00036 #  * the right part is the url re, use r"..." for it
00037 #  * the right part does NOT include "http://" nor "https://" at the beginning
00038 #  * in the right part ".*" means "everything". Just "*" does not work like
00039 #    for filenames on the shell / commandline, you must use ".*" as it is a RE.
00040 #  * in the right part, "^" means "beginning" and "$" means "end"
00041 
00042 wikis = [
00043 
00044     # wikiname, url regular expression
00045     # ---------------------------------------------------------------
00046     ("mywiki", r".*"),   # this is ok for a single wiki
00047 
00048     # for multiple wikis, do something like this:
00049     #("wiki1", r"^http://wiki1\.example\.org/.*$"),
00050     #("wiki2", r"^http://wiki2\.example\.org/.*$"),
00051 ]
00052 
00053 
00054 # Common configuration for all wikis ----------------------------------
00055 
00056 # Everything that should be configured the same way should go here,
00057 # anything else that should be different should go to the single wiki's
00058 # config.
00059 # In that single wiki's config, we will use the class FarmConfig we define
00060 # below as the base config settings and only override what's different.
00061 #
00062 # In exactly the same way, we first include MoinMoin's Config Defaults here -
00063 # this is to get everything to sane defaults, so we need to change only what
00064 # we like to have different:
00065 
00066 from MoinMoin.config import multiconfig, url_prefix_static
00067 
00068 # Now we subclass this DefaultConfig. This means that we inherit every setting
00069 # from the DefaultConfig, except those we explicitely define different.
00070 
00071 class FarmConfig(multiconfig.DefaultConfig):
00072 
00073     # Critical setup  ---------------------------------------------------
00074 
00075     # The URL prefix we use to access the static stuff (img, css, js).
00076     # Note: moin runs a static file server at url_prefix_static path (relative
00077     # to the script url).
00078     # If you run your wiki script at the root of your site (/), just do NOT
00079     # use this setting and it will automatically work.
00080     # If you run your wiki script at /mywiki, you need to use this:
00081     #url_prefix_static = '/mywiki' + url_prefix_static
00082     # If you need different url_prefix_static setups for your wikis,
00083     # you'll have to do it in each wiki's config.
00084 
00085     # Security ----------------------------------------------------------
00086 
00087     # This is checked by some rather critical and potentially harmful actions,
00088     # like despam or PackageInstaller action:
00089     #superuser = [u"YourName", ]
00090 
00091     # IMPORTANT: grant yourself admin rights! replace YourName with
00092     # your user name. See HelpOnAccessControlLists for more help.
00093     # All acl_rights_xxx options must use unicode [Unicode]
00094     #acl_rights_before = u"YourName:read,write,delete,revert,admin"
00095 
00096     # Link spam protection for public wikis (uncomment to enable).
00097     # Needs a reliable internet connection.
00098     #from MoinMoin.security.antispam import SecurityPolicy
00099 
00100 
00101     # Mail --------------------------------------------------------------
00102 
00103     # Configure to enable subscribing to pages (disabled by default) or
00104     # sending forgotten passwords.
00105 
00106     # SMTP server, e.g. "mail.provider.com" (empty or None to disable mail)
00107     #mail_smarthost = ""
00108 
00109     # The return address, e.g u"Jürgen Wiki <noreply@mywiki.org>" [Unicode]
00110     #mail_from = u""
00111 
00112     # "user pwd" if you need to use SMTP AUTH
00113     #mail_login = ""
00114 
00115 
00116     # User interface ----------------------------------------------------
00117 
00118     # Add your wikis important pages at the end. It is not recommended to
00119     # remove the default links.  Leave room for user links - don't use
00120     # more than 6 short items.
00121     # You MUST use Unicode strings here, but you need not use localized
00122     # page names for system and help pages, those will be used automatically
00123     # according to the user selected language. [Unicode]
00124     navi_bar = [
00125         # If you want to show your page_front_page here:
00126         #u'%(page_front_page)s',
00127         u'RecentChanges',
00128         u'FindPage',
00129         u'HelpContents',
00130     ]
00131 
00132     # The default theme anonymous or new users get
00133     theme_default = 'modern'
00134 
00135 
00136     # Language options --------------------------------------------------
00137 
00138     # See http://moinmo.in/ConfigMarket for configuration in
00139     # YOUR language that other people contributed.
00140 
00141     # The main wiki language, set the direction of the wiki pages
00142     language_default = 'en'
00143 
00144     # the following regexes should match the complete name when used in free text
00145     # the group 'all' shall match all, while the group 'key' shall match the key only
00146     # e.g. CategoryFoo -> group 'all' ==  CategoryFoo, group 'key' == Foo
00147     # moin's code will add ^ / $ at beginning / end when needed
00148     # You must use Unicode strings here [Unicode]
00149     page_category_regex = ur'(?P<all>Category(?P<key>\S+))'
00150     page_dict_regex = ur'(?P<all>(?P<key>\S+)Dict)'
00151     page_group_regex = ur'(?P<all>(?P<key>\S+)Group)'
00152     page_template_regex = ur'(?P<all>(?P<key>\S+)Template)'
00153 
00154     # Content options ---------------------------------------------------
00155 
00156     # Show users hostnames in RecentChanges
00157     show_hosts = 1
00158 
00159     # Show the interwiki name (and link it to page_front_page) in the Theme,
00160     # nice for farm setups or when your logo does not show the wiki's name.
00161     show_interwiki = 1
00162     logo_string = u''
00163 
00164     # Enable graphical charts, requires gdchart.
00165     #chart_options = {'width': 600, 'height': 300}
00166