summaryrefslogtreecommitdiff
path: root/examples/filebrowser/server.conf
blob: 3eba40332b29c3b6222b04e2b81fc5798a69bd1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# -*- python -*- Note: this file is in Python syntax

import os

app_template = 'wareweb_zpt'
app_name = 'filebrowser'
framework = 'wareweb'
root_path = os.path.dirname(__file__)
publish_dir = os.path.join(root_path, 'web')

## Server options:

verbose = True
# The name of the server-type to start:
server = 'wsgiutils'
# If true, files will be regularly polled and the server restarted
# if files are modified:
reload = True
# If true, tracebacks will be shown in the browser:
debug = True
show_exceptions_in_error_log = False

browse_path = os.path.join(root_path, 'test-data')

if os.path.exists(os.path.join(root_path, 'local.conf')):
    include('local.conf')

# This is an example that uses SSIs for the page structure:
body_start_regex = [
    r'<!--#include virtual="/lib/header.ssi" -->']
body_end_regex = [
    r'<!--#include virtual="/lib/footer.ssi" -->']
property_regex = [
    r'<!--#set\s+var="(?P<name>[^"]*)"\s+value="(?P<html_value>[^"]*)"\s+-->']
property_template = '<!--#set var="%(name)s" value="%(html_value)s" -->\n'

from mimetypes import types_map
types_map['.ssi'] = 'text/plain'
types_map['.inc'] = 'text/plain'