summaryrefslogtreecommitdiff
path: root/examples/filebrowser/server.conf
blob: a7a11274f7de7e81dbcf514a8ab8d66d9eceace3 (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
40
41
42
43
44
45
46
# -*- 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'

# This is used for the stylesheet in the WYSIWYG editor:
stylesheet = '/lib/style.css'
# This directory is searched for blank.* files:
blank_file_dir = '/lib'
# This is used to map files to their 'live' URLs:
live_web_translation = {'/': 'http://host.com/dir/'}