source: TI03-DataExtractor/trunk/pydxc/clientConfig.py @ 1109

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI03-DataExtractor/trunk/pydxc/clientConfig.py@1109
Revision 1109, 6.1 KB checked in by astephen, 13 years ago (diff)

Stable-ish version with fully-ish working dxc client.

Line 
1#   Copyright (C) 2004 CCLRC & NERC( Natural Environment Research Council ).
2#   This software may be distributed under the terms of the
3#   Q Public License, version 1.0 or later. http://ndg.nerc.ac.uk/public_docs/QPublic_license.txt
4
5"""
6clientConfig.py
7=============
8
9Holds the main configuration details that must be set up in order
10for a version of the package to run on a new machine.
11
12Each option below is documented to guide the user through setting
13up the interface.
14
15All these global variables are used in various parts of the
16package. For consistency they are all CAPITALISED.
17
18"""
19
20# Import python modules
21import os   # used to combine paths in variables below
22
23# DEBUG:
24# Set to 1 if you want to be in DEBUG mode. This reports CGI errors
25# directly to the browser.
26DEBUG=0
27
28# CALL_METHOD
29# Method used for client to communicate with the server.
30# Either "WS" for Web Service or "Local" for local machine.
31CALL_METHOD="WS"
32
33# RESTRICTED_DATA:
34# Do you want security on (1) or off (0)?
35# Note that there is no in-built security implementation in
36# dx, just a set of hooks under which your security system
37# can be called.
38RESTRICTED_DATA=0
39
40# PACKAGE_NAME:
41# This will appear as the main title displayed
42# on the web interface.
43PACKAGE_NAME="Data Extractor"
44
45# LOCAL_RULES:
46# Do you want local rules switched on or off (1 or 0)?
47# This will apply to any parts of the code where local
48# modifications have been made and wrapped in an if clause.
49LOCAL_RULES=0
50
51# REGISTRATION_PAGE:
52# For restricted datasets, this is the web page from which users
53# can find registration details.
54REGISTRATION_PAGE="http://yourhost/your_link.html"
55
56# ADMIN_MAIL_ADDRESS:
57# The e-mail address of the adminstrator for this version. 
58ADMIN_MAIL_ADDRESS="yourmail@yourhost"
59
60# LOCAL_MAIL_HOST:
61# The outgoing mail box address for the host machine.
62# On many systems you can just use "localhost".
63LOCAL_MAIL_HOST="youroutbox.yourdomain"
64
65# ADMIN_NOTIFICATION:
66# Set this to 1 if you want to be notified by e-mail when an error has
67# occurred.
68ADMIN_NOTIFICATION=0
69
70# SOAP_SERVER_URL:
71# URL to Web Service of the form: "http://<host>:<port>/<script>
72SOAP_SERVER_URL="http://localhost:8406/DXController.py"
73
74# LOCAL_SERVER_PACKAGE
75# Local path to Server Package if callable locally
76LOCAL_SERVER_PACKAGE="/home/as56/abstractWebService/dxs"
77
78# MAX_NUM_DATASETS:
79# A kind of fake maximum number of datasets
80# to make the CGI client behave sensibly.
81MAX_NUM_DATASETS=2
82
83# REQUEST_XML_DIR_LOCAL_PATH:
84# Directory for request document uploads and downloads on the local machine.
85# Probably a temporary store. This directory needs to be visible from the
86# webserver (e.g. /srv/www/htdocs/dx/request_xmls).
87REQUEST_XML_DIR_LOCAL_PATH="/home/as56/apache/htdocs/request_xmls"
88
89# REQUEST_XML_DIR_URL_PATH:
90# The URL address of the REQUEST_XML_DIR_LOCAL_PATH
91REQUEST_XML_DIR_URL_PATH="http://localhost/request_xmls"
92
93# STATIC_WEBSERVER_URL_PATH
94# HTTP location of the webserver
95STATIC_WEBSERVER_URL_PATH="http://localhost"
96
97# STATIC_WEBSERVER_LOCAL_PATH
98# Location on the local machine of the webserver top level directory,
99# i.e. the htdocs directory.
100STATIC_WEBSERVER_LOCAL_PATH="/home/as56/apache/htdocs"
101
102# WEB_EXTRAS_URL_PATH:
103# HTTP location of the web extras directory.
104WEB_EXTRAS_URL_PATH=os.path.join(STATIC_WEBSERVER_URL_PATH, "dx_extras")
105
106# WEB_EXTRAS_LOCAL_PATH:
107# Local location of the web extras directory.
108WEB_EXTRAS_LOCAL_PATH=os.path.join(STATIC_WEBSERVER_LOCAL_PATH, "dx_extras")
109
110# CGI_SCRIPT_URL_PATH:
111# The full path of the main CGI script on your system.
112# "http://yourdomain/cgi-bin/dxui" is the most likely but
113# you are free to rename the files if you wish.
114CGI_SCRIPT_URL_PATH=os.path.join(STATIC_WEBSERVER_URL_PATH, "cgi-bin/dxui")
115
116# CGI_SCRIPT_LOCAL_PATH:
117# The local path of the CGI script on your system.
118# "/srv/www/cgi-bin/apwsui.py" is likely on a SUSE system but
119# you are free to rename this as you wish.
120CGI_SCRIPT_LOCAL_PATH="/home/as56/apache/cgi-bin/dxui"
121
122# TOKEN_VALID_LIFETIME:
123# Period before security token (cookie) should expire (in seconds)
124TOKEN_VALID_LIFETIME=60*60*8   # 8 hours
125
126# COOKIE_NAME:
127# Name of cookie to hold security information and user roles.
128COOKIE_NAME="dx_cookie"
129
130# TOKEN_DOMAIN:
131# The domain that should be written in the secure token (cookie).
132TOKEN_DOMAIN="localhost"
133
134# BASEDIR:
135# Full path to the main client package location.
136# "/usr/local/dxc" is recommended but you can change it as
137# you wish.
138BASEDIR="/home/as56/abstractWebService/dxc"
139
140# OUTPUT_DIR_LOCAL_PATH
141# The full path on the local machine of the output directory.
142OUTPUT_DIR_LOCAL_PATH=os.path.join(STATIC_WEBSERVER_LOCAL_PATH, "output")
143
144# OUTPUT_DIR_URL_PATH:
145# The URL address of the OUTPUT_DIR_LOCAL_PATH
146OUTPUT_DIR_URL_PATH=os.path.join(STATIC_WEBSERVER_URL_PATH, "output")
147
148# HTML_DIR_LOCAL_PATH:
149# Location of the HTML header and footer files in the package
150HTML_DIR_LOCAL_PATH=os.path.join(BASEDIR, "html")
151
152# LOGO_DIR:
153# Location of logos for the header section, this should be a
154# full or relative URL and NOT a directory path on your machine.
155LOGO_DIR=os.path.join(STATIC_WEBSERVER_URL_PATH, "dx_extras/logos")
156
157# LEFT_LOGO:
158# Name of logo file for left hand side of header.
159LEFT_LOGO="dx_logo.jpg"
160
161# RIGHT_LOGO:
162# Name of logo file for right hand side of header.
163RIGHT_LOGO="dx_logo.jpg"
164
165# MESSAGE_TO_USERS:
166# A message that will be written at the top of all web pages underneath
167# the main header.
168MESSAGE_TO_USERS="""This is a test version of the %s so it may contain bugs.
169Please contact <A HREF="mailto:%s">%s</A> if an
170error occurs so that we can improve this
171service.""" % (PACKAGE_NAME, ADMIN_MAIL_ADDRESS, ADMIN_MAIL_ADDRESS)
172
173# GEOSPLAT_URL_PATH:
174# The URL of the Visualisor package that the dx connects to
175# once files have been produced.
176GEOSPLAT_URL_PATH="/cgi-bin/splatui"
177
178# CONFIRMATION_PAGE:
179# Should the CGI interface include a confirmation page?
180# 1 for yes and 0 for no.
181CONFIRMATION_PAGE=1
182
183# MAP_APPLET_URL_PATH:
184# URL of map applet HTML page
185MAP_APPLET_URL_PATH="/dx_extras/LiveMap_30/extractorMap.html"
186
Note: See TracBrowser for help on using the repository browser.