comparison cgi-bin/roundup.cgi @ 2633:a9e1fff1e793

I thought I committed this last night. Ho hum. - This implements most of the rest of the new tracker config layout: - dbinit.py split between schema.py and initial_data.py - interfaces.py gone - tracker and detectors __init__.py gone - Added some missing functionality to backends: db_exists test and db_nuke. - Implemented configuration file options in postgresql backend. - Cleaned up tracker initialisation a lot.
author Richard Jones <richard@users.sourceforge.net>
date Tue, 27 Jul 2004 00:57:19 +0000
parents 0dc24dda85cf
children 3084b07ec266 ca122bc16277
comparison
equal deleted inserted replaced
2632:9c55f2bc5961 2633:a9e1fff1e793
14 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 14 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
15 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" 15 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS"
16 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, 16 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
17 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 17 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
18 # 18 #
19 # $Id: roundup.cgi,v 1.39 2004-06-29 08:59:08 richard Exp $ 19 # $Id: roundup.cgi,v 1.40 2004-07-27 00:57:17 richard Exp $
20 20
21 # python version check 21 # python version check
22 from roundup import version_check 22 from roundup import version_check
23 from roundup.i18n import _ 23 from roundup.i18n import _
24 import sys 24 import sys
156 request.end_headers() 156 request.end_headers()
157 out.write('Moved Permanently') 157 out.write('Moved Permanently')
158 else: 158 else:
159 tracker_home = TRACKER_HOMES[tracker] 159 tracker_home = TRACKER_HOMES[tracker]
160 tracker = roundup.instance.open(tracker_home) 160 tracker = roundup.instance.open(tracker_home)
161 from roundup.cgi.client import Unauthorised, NotFound 161 from roundup.cgi import client
162 client = tracker.Client(tracker, request, os.environ) 162 if hasattr(tracker, 'Client'):
163 client = tracker.Client(tracker, request, os.environ)
164 else:
165 client = client.Client(tracker, request, os.environ)
163 try: 166 try:
164 client.main() 167 client.main()
165 except Unauthorised: 168 except client.Unauthorised:
166 request.send_response(403) 169 request.send_response(403)
167 request.send_header('Content-Type', 'text/html') 170 request.send_header('Content-Type', 'text/html')
168 request.end_headers() 171 request.end_headers()
169 out.write('Unauthorised') 172 out.write('Unauthorised')
170 except NotFound: 173 except client.NotFound:
171 request.send_response(404) 174 request.send_response(404)
172 request.send_header('Content-Type', 'text/html') 175 request.send_header('Content-Type', 'text/html')
173 request.end_headers() 176 request.end_headers()
174 out.write('Not found: %s'%client.path) 177 out.write('Not found: %s'%client.path)
175 178

Roundup Issue Tracker: http://roundup-tracker.org/