wiki/config/wikiconfig.py
author Roger Haase <crosseyedpenquin@yahoo.com>
Fri, 23 Jul 2010 09:23:59 -0700
changeset 5712 7a83cc907f68
parent 5508 40594fbcf376
parent 5698 fad9dcb11043
child 5769 c5ba615fdeeb
permissions -rw-r--r--
simplify auto scroll initialization; fix bug in IE init discovered when using IE7 on pages with wide tables
     1 # -*- coding: iso-8859-1 -*-
     2 # IMPORTANT! This encoding (charset) setting MUST be correct! If you live in a
     3 # western country and you don't know that you use utf-8, you probably want to
     4 # use iso-8859-1 (or some other iso charset). If you use utf-8 (a Unicode
     5 # encoding) you MUST use: coding: utf-8
     6 # That setting must match the encoding your editor uses when you modify the
     7 # settings below. If it does not, special non-ASCII chars will be wrong.
     8 
     9 """
    10     MoinMoin - Configuration for a single wiki
    11 
    12     If you run a single wiki only, you can omit the farmconfig.py config
    13     file and just use wikiconfig.py - it will be used for every request
    14     we get in that case.
    15 
    16     Note that there are more config options than you'll find in
    17     the version of this file that is installed by default; see
    18     the module MoinMoin.config.multiconfig for a full list of names and their
    19     default values.
    20 
    21     Also, the URL http://moinmo.in/HelpOnConfiguration has
    22     a list of config options.
    23 
    24     ** Please do not use this file for a wiki farm. Use the sample file
    25     from the wikifarm directory instead! **
    26 """
    27 
    28 import os
    29 
    30 from MoinMoin.config import multiconfig, url_prefix_static
    31 
    32 
    33 class Config(multiconfig.DefaultConfig):
    34 
    35     # Critical setup  ---------------------------------------------------
    36 
    37     # Directory containing THIS wikiconfig:
    38     wikiconfig_dir = os.path.abspath(os.path.dirname(__file__))
    39 
    40     # We assume that this config file is located in the instance directory, like:
    41     # instance_dir/
    42     #              wikiconfig.py
    43     #              data/
    44     #              underlay/
    45     # If that's not true, feel free to just set instance_dir to the real path
    46     # where data/ and underlay/ is located:
    47     #instance_dir = '/where/ever/your/instance/is'
    48     instance_dir = wikiconfig_dir
    49 
    50     # Where your own wiki pages are (make regular backups of this directory):
    51     data_dir = os.path.join(instance_dir, 'data', '') # path with trailing /
    52 
    53     # Where system and help pages are (you may exclude this from backup):
    54     data_underlay_dir = os.path.join(instance_dir, 'underlay', '') # path with trailing /
    55 
    56     # The URL prefix we use to access the static stuff (img, css, js).
    57     # Note: moin runs a static file server at url_prefix_static path (relative
    58     # to the script url).
    59     # If you run your wiki script at the root of your site (/), just do NOT
    60     # use this setting and it will automatically work.
    61     # If you run your wiki script at /mywiki, you need to use this:
    62     #url_prefix_static = '/mywiki' + url_prefix_static
    63 
    64 
    65     # Wiki identity ----------------------------------------------------
    66 
    67     # Site name, used by default for wiki name-logo [Unicode]
    68     sitename = u'Untitled Wiki'
    69 
    70     # Wiki logo. You can use an image, text or both. [Unicode]
    71     # For no logo or text, use '' - the default is to show the sitename.
    72     # See also url_prefix setting below!
    73     logo_string = u'<img src="%s/common/moinmoin.png" alt="MoinMoin Logo">' % url_prefix_static
    74 
    75     # name of entry page / front page [Unicode], choose one of those:
    76 
    77     # a) if most wiki content is in a single language
    78     #page_front_page = u"MyStartingPage"
    79 
    80     # b) if wiki content is maintained in many languages
    81     #page_front_page = u"FrontPage"
    82 
    83     # The interwiki name used in interwiki links
    84     #interwikiname = u'UntitledWiki'
    85     # Show the interwiki name (and link it to page_front_page) in the Theme,
    86     # nice for farm setups or when your logo does not show the wiki's name.
    87     #show_interwiki = 1
    88 
    89 
    90     # Security ----------------------------------------------------------
    91 
    92     # This is checked by some rather critical and potentially harmful actions,
    93     # like despam or PackageInstaller action:
    94     #superuser = [u"YourName", ]
    95 
    96     # IMPORTANT: grant yourself admin rights! replace YourName with
    97     # your user name. See HelpOnAccessControlLists for more help.
    98     # All acl_rights_xxx options must use unicode [Unicode]
    99     #acl_rights_before = u"YourName:read,write,delete,revert,admin"
   100 
   101     # The default (ENABLED) password_checker will keep users from choosing too
   102     # short or too easy passwords. If you don't like this and your site has
   103     # rather low security requirements, feel free to DISABLE the checker by:
   104     #password_checker = None # None means "don't do any password strength checks"
   105 
   106     # Link spam protection for public wikis (Uncomment to enable)
   107     # Needs a reliable internet connection.
   108     #from MoinMoin.security.antispam import SecurityPolicy
   109 
   110 
   111     # Mail --------------------------------------------------------------
   112 
   113     # Configure to enable subscribing to pages (disabled by default)
   114     # or sending forgotten passwords.
   115 
   116     # SMTP server, e.g. "mail.provider.com" (None to disable mail)
   117     #mail_smarthost = ""
   118 
   119     # The return address, e.g u"Jürgen Wiki <noreply@mywiki.org>" [Unicode]
   120     #mail_from = u""
   121 
   122     # "user pwd" if you need to use SMTP AUTH
   123     #mail_login = ""
   124 
   125 
   126     # User interface ----------------------------------------------------
   127 
   128     # Add your wikis important pages at the end. It is not recommended to
   129     # remove the default links.  Leave room for user links - don't use
   130     # more than 6 short items.
   131     # You MUST use Unicode strings here, but you need not use localized
   132     # page names for system and help pages, those will be used automatically
   133     # according to the user selected language. [Unicode]
   134     navi_bar = [
   135         # If you want to show your page_front_page here:
   136         #u'%(page_front_page)s',
   137         u'RecentChanges',
   138         u'FindPage',
   139         u'HelpContents',
   140     ]
   141 
   142     # The default theme anonymous or new users get
   143     theme_default = 'modern'
   144 
   145 
   146     # Language options --------------------------------------------------
   147 
   148     # See http://moinmo.in/ConfigMarket for configuration in
   149     # YOUR language that other people contributed.
   150 
   151     # The main wiki language, set the direction of the wiki pages
   152     language_default = 'en'
   153 
   154     # the following regexes should match the complete name when used in free text
   155     # the group 'all' shall match all, while the group 'key' shall match the key only
   156     # e.g. CategoryFoo -> group 'all' ==  CategoryFoo, group 'key' == Foo
   157     # moin's code will add ^ / $ at beginning / end when needed
   158     # You must use Unicode strings here [Unicode]
   159     page_category_regex = ur'(?P<all>Category(?P<key>(?!Template)\S+))'
   160     page_dict_regex = ur'(?P<all>(?P<key>\S+)Dict)'
   161     page_group_regex = ur'(?P<all>(?P<key>\S+)Group)'
   162     page_template_regex = ur'(?P<all>(?P<key>\S+)Template)'
   163 
   164     # Content options ---------------------------------------------------
   165 
   166     # Show users hostnames in RecentChanges
   167     show_hosts = 1
   168 
   169     # Enable graphical charts, requires gdchart.
   170     #chart_options = {'width': 600, 'height': 300}
   171