From: richard Date: Fri, 30 Aug 2002 08:37:00 +0000 (+0000) Subject: new CGI frontend support X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=75969baf59d96aeff7175ba8268ec0d188706ae3;p=roundup.git new CGI frontend support git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1009 57a73879-2fb5-44c3-a270-3262357dd7e2 --- diff --git a/roundup/scripts/roundup_server.py b/roundup/scripts/roundup_server.py index cd18a80..b5f635e 100644 --- a/roundup/scripts/roundup_server.py +++ b/roundup/scripts/roundup_server.py @@ -16,7 +16,7 @@ # """ HTTP Server that serves roundup. -$Id: roundup_server.py,v 1.5 2002-03-14 23:59:24 richard Exp $ +$Id: roundup_server.py,v 1.6 2002-08-30 08:33:28 richard Exp $ """ # python version check @@ -26,7 +26,7 @@ import sys, os, urllib, StringIO, traceback, cgi, binascii, getopt, imp import BaseHTTPServer # Roundup modules of use here -from roundup import cgitb, cgi_client +from roundup.cgi import cgitb, client import roundup.instance from roundup.i18n import _ @@ -68,9 +68,9 @@ class RoundupRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): sys.stdin = self.rfile try: self.inner_run_cgi() - except cgi_client.NotFound: + except client.NotFound: self.send_error(404, self.path) - except cgi_client.Unauthorised: + except client.Unauthorised: self.send_error(403, self.path) except: # it'd be nice to be able to detect if these are going to have @@ -127,7 +127,7 @@ class RoundupRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): instance_home = self.ROUNDUP_INSTANCE_HOMES[instance_name] instance = roundup.instance.open(instance_home) else: - raise cgi_client.NotFound + raise client.NotFound # figure out what the rest of the path is if len(l_path) > 2: @@ -161,8 +161,8 @@ class RoundupRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): decoded_query = query.replace('+', ' ') # do the roundup thang - client = instance.Client(instance, self, env) - client.main() + c = instance.Client(instance, self, env) + c.main() def usage(message=''): if message: @@ -247,6 +247,9 @@ if __name__ == '__main__': # # $Log: not supported by cvs2svn $ +# Revision 1.5 2002/03/14 23:59:24 richard +# . #517734 ] web header customisation is obscure +# # Revision 1.4 2002/02/21 07:02:54 richard # The correct var is "HTTP_HOST" # diff --git a/roundup/security.py b/roundup/security.py index 5829128..9ff5415 100644 --- a/roundup/security.py +++ b/roundup/security.py @@ -66,8 +66,8 @@ class Security: description="User may register through the email") # initialise the permissions and roles needed for the UIs - from roundup import cgi_client - cgi_client.initialiseSecurity(self) + from roundup.cgi import client + client.initialiseSecurity(self) from roundup import mailgw mailgw.initialiseSecurity(self) diff --git a/roundup/templates/classic/interfaces.py b/roundup/templates/classic/interfaces.py index b8cd2ca..fa605ee 100644 --- a/roundup/templates/classic/interfaces.py +++ b/roundup/templates/classic/interfaces.py @@ -15,13 +15,13 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: interfaces.py,v 1.13 2002-08-16 04:26:00 richard Exp $ +# $Id: interfaces.py,v 1.14 2002-08-30 08:31:01 richard Exp $ import instance_config from roundup import mailgw -from roundup import cgi_client +from roundup.cgi import client -class Client(cgi_client.Client): +class Client(client.Client): ''' derives basic CGI implementation from the standard module, with any specific extensions ''' @@ -35,6 +35,9 @@ class MailGW(mailgw.MailGW): # # $Log: not supported by cvs2svn $ +# Revision 1.13 2002/08/16 04:26:00 richard +# preparation for moving cgi modules around +# # Revision 1.12 2002/01/14 02:20:15 richard # . changed all config accesses so they access either the instance or the # config attriubute on the db. This means that all config is obtained from