~ubuntu-branches/ubuntu/oneiric/moin/oneiric-security

« back to all changes in this revision

Viewing changes to wiki/server/wikiserverconfig.py

  • Committer: Bazaar Package Importer
  • Author(s): Jamie Strandboge
  • Date: 2010-03-30 12:55:34 UTC
  • mfrom: (0.1.17 sid)
  • Revision ID: james.westby@ubuntu.com-20100330125534-4c2ufc1rok24447l
Tags: 1.9.2-2ubuntu1
* Merge from Debian testing (LP: #521834). Based on work by Stefan Ebner.
  Remaining changes:
 - Remove python-xml from Suggests field, the package isn't anymore in
   sys.path.
 - Demote fckeditor from Recommends to Suggests; the code was previously
   embedded in moin, but it was also disabled, so there's no reason for us
   to pull this in by default currently. Note: This isn't necessary anymore
   but needs a MIR for fckeditor, so postpone dropping this change until
   lucid+1
* debian/rules:
  - Replace hardcoded python2.5 with python* and hardcore python2.6 for ln
* debian/control.in: drop versioned depends on cdbs

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
    Standalone server configuration, you can either use this file or
3
3
    commandline options to configure server options.
4
4
"""
 
5
import os
5
6
 
6
7
from MoinMoin.script.server.standalone import DefaultConfig
7
8
 
8
 
class Config(DefaultConfig):
 
9
class LocalConfig(DefaultConfig):
9
10
    port = 8080 # if you use port < 1024, you need to start as root
10
11
 
11
12
    # if you start the server as root, the standalone server can change
16
17
    # use '' for all interface or "1.2.3.4" for some specific IP
17
18
    #interface = 'localhost'
18
19
 
19
 
    # where the static data is served from:
20
 
    #docs = "/usr/share/moin/htdocs"
 
20
    # where the static data is served from - you can either use:
 
21
    # docs = True  # serve the builtin static data from MoinMoin/web/static/htdocs
 
22
    # docs = '/where/ever/you/like/to/keep/htdocs'  # serve it from the given path
 
23
    # docs = False  # do not serve static files at all (will not work except
 
24
    #               # you serve them in some other working way)
 
25
    docs = True
21
26
 
22
27
    # tuning options:
23
28
    #serverClass = 'ThreadPoolServer'
24
29
    #threadLimit = 10
25
30
    #requestQueueSize = 50
26
31
 
 
32
    # How to debug? Your options:
 
33
    # debug = 'off' # for production wikis, exceptions are logged
 
34
    # debug = 'web' # show traceback in the browser, offer debug console,
 
35
    #               # this makes use of a built-in debugger (werkzeug.debug)
 
36
    # debug = 'external' # don't catch Exceptions, so some external debugger gets them
 
37
    # CAUTION: Do not use anything but 'off' for production environments as it
 
38
    #          might disclose sensitive informations and even enable doing evil
 
39
    #          things from some debugger's web interface!
 
40
    # For convenience, the default behaviour (see below) is to read the
 
41
    # environment variable MOIN_DEBUGGER. If not set, it means the same as 'off'.
 
42
    debug = os.environ.get('MOIN_DEBUGGER', 'off')
 
43
 
 
44
# DEVELOPERS! Do not add your configuration items there,
 
45
# you could accidentally commit them! Instead, create a
 
46
# wikiserverconfig_local.py file containing this:
 
47
#
 
48
# from wikiserverconfig import LocalConfig
 
49
#
 
50
# class Config(LocalConfig):
 
51
#     configuration_item_1 = 'value1'
 
52
#
 
53
 
 
54
try:
 
55
    from wikiserverconfig_local import Config
 
56
except ImportError, err:
 
57
    if not str(err).endswith('wikiserverconfig_local'):
 
58
        raise
 
59
    Config = LocalConfig