Back to index

moin  1.9.0~rc2
wikiconfig.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 single wiki
00011 
00012     If you run a single wiki only, you can omit the farmconfig.py config
00013     file and just use wikiconfig.py - it will be used for every request
00014     we get in that case.
00015 
00016     Note that there are more config options than you'll find in
00017     the version of this file that is installed by default; see
00018     the module MoinMoin.config.multiconfig for a full list of names and their
00019     default values.
00020 
00021     Also, the URL http://moinmo.in/HelpOnConfiguration has
00022     a list of config options.
00023 
00024     ** Please do not use this file for a wiki farm. Use the sample file
00025     from the wikifarm directory instead! **
00026 """
00027 
00028 import os
00029 
00030 from MoinMoin.config import multiconfig, url_prefix_static
00031 
00032 
00033 class Config(multiconfig.DefaultConfig):
00034 
00035     # Critical setup  ---------------------------------------------------
00036 
00037     # Directory containing THIS wikiconfig:
00038     wikiconfig_dir = os.path.abspath(os.path.dirname(__file__))
00039 
00040     # We assume that this config file is located in the instance directory, like:
00041     # instance_dir/
00042     #              wikiconfig.py
00043     #              data/
00044     #              underlay/
00045     # If that's not true, feel free to just set instance_dir to the real path
00046     # where data/ and underlay/ is located:
00047     #instance_dir = '/where/ever/your/instance/is'
00048     instance_dir = wikiconfig_dir
00049 
00050     # Where your own wiki pages are (make regular backups of this directory):
00051     data_dir = os.path.join(instance_dir, 'data', '') # path with trailing /
00052 
00053     # Where system and help pages are (you may exclude this from backup):
00054     data_underlay_dir = os.path.join(instance_dir, 'underlay', '') # path with trailing /
00055 
00056     # The URL prefix we use to access the static stuff (img, css, js).
00057     # Note: moin runs a static file server at url_prefix_static path (relative
00058     # to the script url).
00059     # If you run your wiki script at the root of your site (/), just do NOT
00060     # use this setting and it will automatically work.
00061     # If you run your wiki script at /mywiki, you need to use this:
00062     #url_prefix_static = '/mywiki' + url_prefix_static
00063 
00064 
00065     # Wiki identity ----------------------------------------------------
00066 
00067     # Site name, used by default for wiki name-logo [Unicode]
00068     sitename = u'Untitled Wiki'
00069 
00070     # Wiki logo. You can use an image, text or both. [Unicode]
00071     # For no logo or text, use '' - the default is to show the sitename.
00072     # See also url_prefix setting below!
00073     logo_string = u'<img src="%s/common/moinmoin.png" alt="MoinMoin Logo">' % url_prefix_static
00074 
00075     # name of entry page / front page [Unicode], choose one of those:
00076 
00077     # a) if most wiki content is in a single language
00078     #page_front_page = u"MyStartingPage"
00079 
00080     # b) if wiki content is maintained in many languages
00081     #page_front_page = u"FrontPage"
00082 
00083     # The interwiki name used in interwiki links
00084     #interwikiname = u'UntitledWiki'
00085     # Show the interwiki name (and link it to page_front_page) in the Theme,
00086     # nice for farm setups or when your logo does not show the wiki's name.
00087     #show_interwiki = 1
00088 
00089 
00090     # Security ----------------------------------------------------------
00091 
00092     # This is checked by some rather critical and potentially harmful actions,
00093     # like despam or PackageInstaller action:
00094     #superuser = [u"YourName", ]
00095 
00096     # IMPORTANT: grant yourself admin rights! replace YourName with
00097     # your user name. See HelpOnAccessControlLists for more help.
00098     # All acl_rights_xxx options must use unicode [Unicode]
00099     #acl_rights_before = u"YourName:read,write,delete,revert,admin"
00100 
00101     # The default (ENABLED) password_checker will keep users from choosing too
00102     # short or too easy passwords. If you don't like this and your site has
00103     # rather low security requirements, feel free to DISABLE the checker by:
00104     #password_checker = None # None means "don't do any password strength checks"
00105 
00106     # Link spam protection for public wikis (Uncomment to enable)
00107     # Needs a reliable internet connection.
00108     #from MoinMoin.security.antispam import SecurityPolicy
00109 
00110 
00111     # Mail --------------------------------------------------------------
00112 
00113     # Configure to enable subscribing to pages (disabled by default)
00114     # or sending forgotten passwords.
00115 
00116     # SMTP server, e.g. "mail.provider.com" (None to disable mail)
00117     #mail_smarthost = ""
00118 
00119     # The return address, e.g u"Jürgen Wiki <noreply@mywiki.org>" [Unicode]
00120     #mail_from = u""
00121 
00122     # "user pwd" if you need to use SMTP AUTH
00123     #mail_login = ""
00124 
00125 
00126     # User interface ----------------------------------------------------
00127 
00128     # Add your wikis important pages at the end. It is not recommended to
00129     # remove the default links.  Leave room for user links - don't use
00130     # more than 6 short items.
00131     # You MUST use Unicode strings here, but you need not use localized
00132     # page names for system and help pages, those will be used automatically
00133     # according to the user selected language. [Unicode]
00134     navi_bar = [
00135         # If you want to show your page_front_page here:
00136         #u'%(page_front_page)s',
00137         u'RecentChanges',
00138         u'FindPage',
00139         u'HelpContents',
00140     ]
00141 
00142     # The default theme anonymous or new users get
00143     theme_default = 'modern'
00144 
00145 
00146     # Language options --------------------------------------------------
00147 
00148     # See http://moinmo.in/ConfigMarket for configuration in
00149     # YOUR language that other people contributed.
00150 
00151     # The main wiki language, set the direction of the wiki pages
00152     language_default = 'en'
00153 
00154     # the following regexes should match the complete name when used in free text
00155     # the group 'all' shall match all, while the group 'key' shall match the key only
00156     # e.g. CategoryFoo -> group 'all' ==  CategoryFoo, group 'key' == Foo
00157     # moin's code will add ^ / $ at beginning / end when needed
00158     # You must use Unicode strings here [Unicode]
00159     page_category_regex = ur'(?P<all>Category(?P<key>(?!Template)\S+))'
00160     page_dict_regex = ur'(?P<all>(?P<key>\S+)Dict)'
00161     page_group_regex = ur'(?P<all>(?P<key>\S+)Group)'
00162     page_template_regex = ur'(?P<all>(?P<key>\S+)Template)'
00163 
00164     # Content options ---------------------------------------------------
00165 
00166     # Show users hostnames in RecentChanges
00167     show_hosts = 1
00168 
00169     # Enable graphical charts, requires gdchart.
00170     #chart_options = {'width': 600, 'height': 300}
00171