Mercurial > p > roundup > code
changeset 1096:fa7df238e2d4
More cleaning up of configuration, and the "instance" -> "tracker" renaming.
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Tue, 10 Sep 2002 03:01:20 +0000 |
| parents | 711f2ecee20f |
| children | 98f3d41f41d9 |
| files | cgi-bin/roundup.cgi doc/customizing.txt doc/getting_started.txt doc/installation.txt doc/upgrading.txt frontends/ZRoundup/ZRoundup.py frontends/ZRoundup/__init__.py roundup/admin.py roundup/cgi/client.py roundup/cgi/templating.py roundup/mailgw.py roundup/roundupdb.py roundup/scripts/roundup_server.py roundup/templates/classic/config.py roundup/templates/classic/html/home.classlist scripts/roundup-reminder test/test_db.py test/test_schema.py |
| diffstat | 18 files changed, 110 insertions(+), 101 deletions(-) [+] |
line wrap: on
line diff
--- a/cgi-bin/roundup.cgi Tue Sep 10 02:37:28 2002 +0000 +++ b/cgi-bin/roundup.cgi Tue Sep 10 03:01:20 2002 +0000 @@ -16,7 +16,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: roundup.cgi,v 1.30 2002-09-10 01:07:05 richard Exp $ +# $Id: roundup.cgi,v 1.31 2002-09-10 03:01:17 richard Exp $ # python version check from roundup import version_check @@ -32,7 +32,7 @@ # documented below are set, they _override_ any configuation defaults # given in this file. -# ROUNDUP_INSTANCE_HOMES is a list of instances, in the form +# TRACKER_HOMES is a list of instances, in the form # "NAME=DIR<sep>NAME2=DIR2<sep>...", where <sep> is the directory path # separator (";" on Windows, ":" on Unix). @@ -43,7 +43,7 @@ # used in the code. Higher numbers means more debugging output. # This indicates where the Roundup instance lives -ROUNDUP_INSTANCE_HOMES = { +TRACKER_HOMES = { 'demo': '/var/roundup/instances/demo', } @@ -81,11 +81,16 @@ # def checkconfig(): import os, string - global ROUNDUP_INSTANCE_HOMES, LOG + global TRACKER_HOMES, LOG - homes = os.environ.get('ROUNDUP_INSTANCE_HOMES', '') + # see if there's an environment var. ROUNDUP_INSTANCE_HOMES is the + # old name for it. + if os.environ.has_key('ROUNDUP_INSTANCE_HOMES'): + homes = os.environ.get('ROUNDUP_INSTANCE_HOMES') + else: + homes = os.environ.get('TRACKER_HOMES', '') if homes: - ROUNDUP_INSTANCE_HOMES = {} + TRACKER_HOMES = {} for home in string.split(homes, os.pathsep): try: name, dir = string.split(home, '=', 1) @@ -93,7 +98,7 @@ # ignore invalid definitions continue if name and dir: - ROUNDUP_INSTANCE_HOMES[name] = dir + TRACKER_HOMES[name] = dir logname = os.environ.get('ROUNDUP_LOG', '') if logname: @@ -129,9 +134,9 @@ request = RequestWrapper(out) request.path = os.environ.get('PATH_INFO', '/') instance = path[1] - os.environ['INSTANCE_NAME'] = instance + os.environ['TRACKER_NAME'] = instance os.environ['PATH_INFO'] = string.join(path[2:], '/') - if ROUNDUP_INSTANCE_HOMES.has_key(instance): + if TRACKER_HOMES.has_key(instance): # redirect if we need a trailing '/' if len(path) == 2: request.send_response(301) @@ -141,7 +146,7 @@ request.end_headers() out.write('Moved Permanently') else: - instance_home = ROUNDUP_INSTANCE_HOMES[instance] + instance_home = TRACKER_HOMES[instance] instance = roundup.instance.open(instance_home) from roundup.cgi.client import Unauthorised, NotFound client = instance.Client(instance, request, os.environ) @@ -166,7 +171,7 @@ w = request.write w(_('<html><head><title>Roundup instances index</title></head>\n')) w(_('<body><h1>Roundup instances index</h1><ol>\n')) - homes = ROUNDUP_INSTANCE_HOMES.keys() + homes = TRACKER_HOMES.keys() homes.sort() for instance in homes: w(_('<li><a href="%(instance_url)s/index">%(instance_name)s</a>\n')%{
--- a/doc/customizing.txt Tue Sep 10 02:37:28 2002 +0000 +++ b/doc/customizing.txt Tue Sep 10 03:01:20 2002 +0000 @@ -2,7 +2,7 @@ Customising Roundup =================== -:Version: $Revision: 1.24 $ +:Version: $Revision: 1.25 $ .. This document borrows from the ZopeBook section on ZPT. The original is at: http://www.zope.org/Documentation/Books/ZopeBook/current/ZPT.stx @@ -57,7 +57,7 @@ configuration for the web and e-mail components of roundup's interfaces. This file is a Python module. The configuration variables available are: -**INSTANCE_HOME** - ``os.path.split(__file__)[0]`` +**TRACKER_HOME** - ``os.path.split(__file__)[0]`` The tracker home directory. The above default code will automatically determine the tracker home for you. @@ -67,23 +67,23 @@ **MAIL_DOMAIN** - ``'your.tracker.email.domain.example'`` The domain name used for email addresses. -**DATABASE** - ``os.path.join(INSTANCE_HOME, 'db')`` +**DATABASE** - ``os.path.join(TRACKER_HOME, 'db')`` This is the directory that the database is going to be stored in. By default it is in the tracker home. -**TEMPLATES** - ``os.path.join(INSTANCE_HOME, 'html')`` +**TEMPLATES** - ``os.path.join(TRACKER_HOME, 'html')`` This is the directory that the HTML templates reside in. By default they are in the tracker home. -**INSTANCE_NAME** - ``'Roundup issue tracker'`` +**TRACKER_NAME** - ``'Roundup issue tracker'`` A descriptive name for your roundup tracker. This is sent out in e-mails and appears in the heading of CGI pages. -**ISSUE_TRACKER_EMAIL** - ``'issue_tracker@%s'%MAIL_DOMAIN`` +**TRACKER_EMAIL** - ``'issue_tracker@%s'%MAIL_DOMAIN`` The email address that e-mail sent to roundup should go to. Think of it as the tracker's personal e-mail address. -**ISSUE_TRACKER_WEB** - ``'http://your.tracker.url.example/'`` +**TRACKER_WEB** - ``'http://your.tracker.url.example/'`` The web address that the tracker is viewable at. This will be included in information sent to users of the tracker. @@ -126,7 +126,7 @@ tracker is attempted.:: # roundup home is this package's directory - INSTANCE_HOME=os.path.split(__file__)[0] + TRACKER_HOME=os.path.split(__file__)[0] # The SMTP mail host that roundup will use to send mail MAILHOST = 'localhost' @@ -135,26 +135,23 @@ MAIL_DOMAIN = 'your.tracker.email.domain.example' # This is the directory that the database is going to be stored in - DATABASE = os.path.join(INSTANCE_HOME, 'db') + DATABASE = os.path.join(TRACKER_HOME, 'db') # This is the directory that the HTML templates reside in - TEMPLATES = os.path.join(INSTANCE_HOME, 'html') + TEMPLATES = os.path.join(TRACKER_HOME, 'html') # A descriptive name for your roundup tracker - INSTANCE_NAME = 'Roundup issue tracker' + TRACKER_NAME = 'Roundup issue tracker' # The email address that mail to roundup should go to - ISSUE_TRACKER_EMAIL = 'issue_tracker@%s'%MAIL_DOMAIN + TRACKER_EMAIL = 'issue_tracker@%s'%MAIL_DOMAIN # The web address that the tracker is viewable at - ISSUE_TRACKER_WEB = 'http://your.tracker.url.example/' + TRACKER_WEB = 'http://your.tracker.url.example/' # The email address that roundup will complain to if it runs into trouble ADMIN_EMAIL = 'roundup-admin@%s'%MAIL_DOMAIN - # Somewhere for roundup to log stuff internally sent to stdout or stderr - LOG = os.path.join(INSTANCE_HOME, 'roundup.log') - # Send nosy messages to the author of the message MESSAGES_TO_AUTHOR = 'no' # either 'yes' or 'no'
--- a/doc/getting_started.txt Tue Sep 10 02:37:28 2002 +0000 +++ b/doc/getting_started.txt Tue Sep 10 03:01:20 2002 +0000 @@ -2,7 +2,7 @@ Getting Started =============== -:Version: $Revision: 1.6 $ +:Version: $Revision: 1.7 $ .. contents:: @@ -62,12 +62,12 @@ The SMTP mail host that roundup will use to send mail MAIL_DOMAIN The domain name used for email addresses -ISSUE_TRACKER_WEB +TRACKER_WEB The web address of the issue tracker's web interface The email addresses used by the system by default are: -ISSUE_TRACKER_EMAIL: ``issue_tracker@MAIL_DOMAIN`` +TRACKER_EMAIL: ``issue_tracker@MAIL_DOMAIN`` submissions of issues ADMIN_EMAIL: ``roundup-admin@MAIL_DOMAIN`` @@ -136,21 +136,21 @@ This software will work through apache or stand-alone. Stand-alone: - 1. Edit roundup-server at the top - ``ROUNDUP_INSTANCE_HOMES`` needs to know + 1. Edit roundup-server at the top - ``TRACKER_HOMES`` needs to know about your tracker. You may also specify the values for - ``ROUNDUP_INSTANCE_HOMES`` on the command-line using "name=home" pairs. + ``TRACKER_HOMES`` on the command-line using "name=home" pairs. 2. "``roundup-server [-p port] (name=tracker_home)*``" (hostname may be "") 3. Load up the page "``/<tracker name>/index``" where tracker name is the name - you nominated in ``ROUNDUP_INSTANCE_HOMES``. + you nominated in ``TRACKER_HOMES``. Apache: 1. The CGI script is found in the cgi-bin directory of the roundup distribution. 2. Make sure roundup.cgi is executable. Edit it at the top - - ``ROUNDUP_INSTANCE_HOMES`` needs to know about your tracker. + ``TRACKER_HOMES`` needs to know about your tracker. 3. Edit your "``/etc/httpd/conf/httpd.conf``" and make sure that the "``/home/httpd/html/roundup/roundup.cgi``" script will be treated as a CGI script. @@ -158,13 +158,13 @@ 4. Re-start your apache to re-load the config if necessary. 5. Load up the page "``/roundup/roundup.cgi/index/``" where tracker name is the - name you nominated in ``ROUNDUP_INSTANCE_HOMES``. + name you nominated in ``TRACKER_HOMES``. 6. To use the CGI script unchanged, which allows much easier updates, add these directives to your "httpd.conf":: SetEnv ROUNDUP_LOG "/var/log/roundup.log" - SetEnv ROUNDUP_INSTANCE_HOMES "Default=/usr/local/share/roundup/trackers/Default" + SetEnv TRACKER_HOMES "Default=/usr/local/share/roundup/trackers/Default" SetEnv ROUNDUP_DEBUG "0" 7. On Windows, write a batch file "roundup.bat" similar to the one below and @@ -172,7 +172,7 @@ @echo off set ROUNDUP_LOG=c:\Python21\share\roundup\cgi.log - set ROUNDUP_INSTANCE_HOMES=Default=c:\Python21\share\roundup\trackers\Default; + set TRACKER_HOMES=Default=c:\Python21\share\roundup\trackers\Default; set ROUNDUP_DEBUG=0 c:\Python21\python.exe c:\Python21\share\roundup\cgi-bin\roundup.cgi
--- a/doc/installation.txt Tue Sep 10 02:37:28 2002 +0000 +++ b/doc/installation.txt Tue Sep 10 03:01:20 2002 +0000 @@ -2,7 +2,7 @@ Installing Roundup ================== -:Version: $Revision: 1.22 $ +:Version: $Revision: 1.23 $ .. contents:: @@ -240,7 +240,7 @@ Install roundup as usual (see installation_). ZRoundup installs as a regular Zope product. Copy the ZRoundup directory to -your Products directory either in an INSTANCE_HOME/Products or the Zope +your Products directory either in an TRACKER_HOME/Products or the Zope code tree lib/python/Products. You will need to create the tracker using the roundup-admin tool (step 2 in
--- a/doc/upgrading.txt Tue Sep 10 02:37:28 2002 +0000 +++ b/doc/upgrading.txt Tue Sep 10 03:01:20 2002 +0000 @@ -89,6 +89,13 @@ Role. See the section on customising security in the `customisation documentation`_ for more information. +Finally, the following config variables have been renamed to make more sense: + +- INSTANCE_HOME -> TRACKER_HOME +- INSTANCE_NAME -> TRACKER_NAME +- ISSUE_TRACKER_WEB -> TRACKER_WEB +- ISSUE_TRACKER_EMAIL -> TRACKER_EMAIL + 0.5.0 Schema Specification -------------------------- @@ -594,7 +601,7 @@ 0.4.0 Configuration -------------------- -``INSTANCE_NAME`` and ``EMAIL_SIGNATURE_POSITION`` have been added to the +``TRACKER_NAME`` and ``EMAIL_SIGNATURE_POSITION`` have been added to the instance_config.py. The simplest solution is to copy the default values from template in the core source.
--- a/frontends/ZRoundup/ZRoundup.py Tue Sep 10 02:37:28 2002 +0000 +++ b/frontends/ZRoundup/ZRoundup.py Tue Sep 10 03:01:20 2002 +0000 @@ -14,7 +14,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: ZRoundup.py,v 1.12 2002-09-10 01:07:05 richard Exp $ +# $Id: ZRoundup.py,v 1.13 2002-09-10 03:01:18 richard Exp $ # ''' ZRoundup module - exposes the roundup web interface to Zope @@ -135,12 +135,12 @@ # special case when roundup is '/' in this virtual host, if path == "/" : env['SCRIPT_NAME'] = "/" - env['INSTANCE_NAME'] = '' + env['TRACKER_NAME'] = '' else : # all but the last element is the path env['SCRIPT_NAME'] = '/'.join( path_components[:-1] ) # the last element is the name - env['INSTANCE_NAME'] = path_components[-1] + env['TRACKER_NAME'] = path_components[-1] if env['REQUEST_METHOD'] == 'GET': # force roundup to re-parse the request because Zope fiddles
--- a/frontends/ZRoundup/__init__.py Tue Sep 10 02:37:28 2002 +0000 +++ b/frontends/ZRoundup/__init__.py Tue Sep 10 03:01:20 2002 +0000 @@ -14,15 +14,15 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: __init__.py,v 1.2 2002-09-10 01:07:05 richard Exp $ +# $Id: __init__.py,v 1.3 2002-09-10 03:01:18 richard Exp $ # __version__='1.0' import os # figure where ZRoundup is installed here = None -if os.environ.has_key('INSTANCE_HOME'): - here = os.environ['INSTANCE_HOME'] +if os.environ.has_key('TRACKER_HOME'): + here = os.environ['TRACKER_HOME'] path = os.path.join(here, 'Products', 'ZRoundup') if not os.path.exists(path): path = os.path.join(here, 'lib', 'python', 'Products', 'ZRoundup')
--- a/roundup/admin.py Tue Sep 10 02:37:28 2002 +0000 +++ b/roundup/admin.py Tue Sep 10 03:01:20 2002 +0000 @@ -16,7 +16,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: admin.py,v 1.25 2002-09-10 00:18:20 richard Exp $ +# $Id: admin.py,v 1.26 2002-09-10 03:01:18 richard Exp $ import sys, os, getpass, getopt, re, UserDict, shlex, shutil try: @@ -140,7 +140,7 @@ to the roundup instance you're working with. A roundup instance is where roundup keeps the database and configuration file that defines an issue tracker. It may be thought of as the issue tracker's "home directory". It may -be specified in the environment variable ROUNDUP_INSTANCE or on the command +be specified in the environment variable TRACKER_HOME or on the command line as "-i instance". A designator is a classname and a nodeid concatenated, eg. bug1, user10, ... @@ -254,7 +254,7 @@ Install a new Roundup instance. The command will prompt for the instance home directory (if not supplied - through INSTANCE_HOME or the -i option). The template, backend and admin + through TRACKER_HOME or the -i option). The template, backend and admin password may be specified on the command-line as arguments, in that order. @@ -1112,7 +1112,7 @@ return 1 # handle command-line args - self.instance_home = os.environ.get('ROUNDUP_INSTANCE', '') + self.instance_home = os.environ.get('TRACKER_HOME', '') # TODO: reinstate the user/password stuff (-u arg too) name = password = '' if os.environ.has_key('ROUNDUP_LOGIN'):
--- a/roundup/cgi/client.py Tue Sep 10 02:37:28 2002 +0000 +++ b/roundup/cgi/client.py Tue Sep 10 03:01:20 2002 +0000 @@ -1,4 +1,4 @@ -# $Id: client.py,v 1.25 2002-09-09 23:55:19 richard Exp $ +# $Id: client.py,v 1.26 2002-09-10 03:01:18 richard Exp $ __doc__ = """ WWW request handler (also used in the stand-alone server). @@ -76,7 +76,7 @@ self.path = env['PATH_INFO'] self.split_path = self.path.split('/') - self.instance_path_name = env['INSTANCE_NAME'] + self.instance_path_name = env['TRACKER_NAME'] # this is the base URL for this instance url = self.env['SCRIPT_NAME'] + '/' + self.instance_path_name @@ -431,7 +431,7 @@ expire = Cookie._getdate(86400*365) # generate the cookie path - make sure it has a trailing '/' - path = '/'.join((self.env['SCRIPT_NAME'], self.env['INSTANCE_NAME'], + path = '/'.join((self.env['SCRIPT_NAME'], self.env['TRACKER_NAME'], '')) self.header({'Set-Cookie': 'roundup_user_2=%s; expires=%s; Path=%s;'%( self.session, expire, path)}) @@ -452,7 +452,7 @@ # construct the logout cookie now = Cookie._getdate() - path = '/'.join((self.env['SCRIPT_NAME'], self.env['INSTANCE_NAME'], + path = '/'.join((self.env['SCRIPT_NAME'], self.env['TRACKER_NAME'], '')) self.header({'Set-Cookie': 'roundup_user_2=deleted; Max-Age=0; expires=%s; Path=%s;'%(now, @@ -528,7 +528,7 @@ # construct the logout cookie now = Cookie._getdate() - path = '/'.join((self.env['SCRIPT_NAME'], self.env['INSTANCE_NAME'], + path = '/'.join((self.env['SCRIPT_NAME'], self.env['TRACKER_NAME'], '')) self.header(headers={'Set-Cookie': 'roundup_user_2=deleted; Max-Age=0; expires=%s; Path=%s;'%(now, path)})
--- a/roundup/cgi/templating.py Tue Sep 10 02:37:28 2002 +0000 +++ b/roundup/cgi/templating.py Tue Sep 10 03:01:20 2002 +0000 @@ -1104,7 +1104,7 @@ def description(self): ''' Return a description of the request - handle for the page title. ''' - s = [self.client.db.config.INSTANCE_NAME] + s = [self.client.db.config.TRACKER_NAME] if self.classname: if self.client.nodeid: s.append('- %s%s'%(self.classname, self.client.nodeid))
--- a/roundup/mailgw.py Tue Sep 10 02:37:28 2002 +0000 +++ b/roundup/mailgw.py Tue Sep 10 03:01:20 2002 +0000 @@ -73,7 +73,7 @@ an exception, the original message is bounced back to the sender with the explanatory message given in the exception. -$Id: mailgw.py,v 1.84 2002-09-10 02:37:27 richard Exp $ +$Id: mailgw.py,v 1.85 2002-09-10 03:01:18 richard Exp $ ''' import string, re, os, mimetools, cStringIO, smtplib, socket, binascii, quopri @@ -239,8 +239,8 @@ msg = cStringIO.StringIO() writer = MimeWriter.MimeWriter(msg) writer.addheader('Subject', subject) - writer.addheader('From', '%s <%s>'% (self.instance.config.INSTANCE_NAME, - self.instance.config.ISSUE_TRACKER_EMAIL)) + writer.addheader('From', '%s <%s>'% (self.instance.config.TRACKER_NAME, + self.instance.config.TRACKER_EMAIL)) writer.addheader('To', ','.join(sendto)) writer.addheader('MIME-Version', '1.0') part = writer.startmultipartbody('mixed') @@ -561,7 +561,7 @@ # now update the recipients list recipients = [] - tracker_email = self.instance.config.ISSUE_TRACKER_EMAIL.lower() + tracker_email = self.instance.config.TRACKER_EMAIL.lower() for recipient in message.getaddrlist('to') + message.getaddrlist('cc'): r = recipient[1].strip().lower() if r == tracker_email or not r:
--- a/roundup/roundupdb.py Tue Sep 10 02:37:28 2002 +0000 +++ b/roundup/roundupdb.py Tue Sep 10 03:01:20 2002 +0000 @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: roundupdb.py,v 1.65 2002-09-10 02:37:28 richard Exp $ +# $Id: roundupdb.py,v 1.66 2002-09-10 03:01:18 richard Exp $ __doc__ = """ Extending hyperdb with types specific to issue-tracking. @@ -214,10 +214,10 @@ writer.addheader('Subject', '[%s%s] %s'%(cn, nodeid, title)) writer.addheader('To', ', '.join(sendto)) writer.addheader('From', straddr( - (authname, self.db.config.ISSUE_TRACKER_EMAIL) ) ) + (authname, self.db.config.TRACKER_EMAIL) ) ) writer.addheader('Reply-To', straddr( - (self.db.config.INSTANCE_NAME, - self.db.config.ISSUE_TRACKER_EMAIL) ) ) + (self.db.config.TRACKER_NAME, + self.db.config.TRACKER_EMAIL) ) ) writer.addheader('MIME-Version', '1.0') if messageid: writer.addheader('Message-Id', messageid) @@ -225,7 +225,7 @@ writer.addheader('In-Reply-To', inreplyto) # add a uniquely Roundup header to help filtering - writer.addheader('X-Roundup-Name', self.db.config.INSTANCE_NAME) + writer.addheader('X-Roundup-Name', self.db.config.TRACKER_NAME) # attach files if message_files: @@ -288,17 +288,17 @@ # simplistic check to see if the url is valid, # then append a trailing slash if it is missing - base = self.db.config.ISSUE_TRACKER_WEB + base = self.db.config.TRACKER_WEB if not isinstance(base , type('')) or not base.startswith('http://'): - base = "Configuration Error: ISSUE_TRACKER_WEB isn't a " \ + base = "Configuration Error: TRACKER_WEB isn't a " \ "fully-qualified URL" elif base[-1] != '/' : base += '/' web = base + 'issue'+ nodeid # ensure the email address is properly quoted - email = straddr((self.db.config.INSTANCE_NAME, - self.db.config.ISSUE_TRACKER_EMAIL)) + email = straddr((self.db.config.TRACKER_NAME, + self.db.config.TRACKER_EMAIL)) line = '_' * max(len(web), len(email)) return '%s\n%s\n%s\n%s'%(line, email, web, line)
--- a/roundup/scripts/roundup_server.py Tue Sep 10 02:37:28 2002 +0000 +++ b/roundup/scripts/roundup_server.py Tue Sep 10 03:01:20 2002 +0000 @@ -16,7 +16,7 @@ # """ HTTP Server that serves roundup. -$Id: roundup_server.py,v 1.9 2002-09-10 01:07:06 richard Exp $ +$Id: roundup_server.py,v 1.10 2002-09-10 03:01:19 richard Exp $ """ # python version check @@ -35,7 +35,7 @@ # # This indicates where the Roundup instance lives -ROUNDUP_INSTANCE_HOMES = { +TRACKER_HOMES = { 'bar': '/tmp/bar', } @@ -57,7 +57,7 @@ class RoundupRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): - ROUNDUP_INSTANCE_HOMES = ROUNDUP_INSTANCE_HOMES + TRACKER_HOMES = TRACKER_HOMES ROUNDUP_USER = ROUNDUP_USER def run_cgi(self): @@ -101,7 +101,7 @@ w = self.wfile.write w(_('<html><head><title>Roundup instances index</title></head>\n')) w(_('<body><h1>Roundup instances index</h1><ol>\n')) - for instance in self.ROUNDUP_INSTANCE_HOMES.keys(): + for instance in self.TRACKER_HOMES.keys(): w(_('<li><a href="%(instance_url)s/index">%(instance_name)s</a>\n')%{ 'instance_url': urllib.quote(instance), 'instance_name': cgi.escape(instance)}) @@ -123,8 +123,8 @@ return self.index() l_path = rest.split('/') instance_name = urllib.unquote(l_path[1]) - if self.ROUNDUP_INSTANCE_HOMES.has_key(instance_name): - instance_home = self.ROUNDUP_INSTANCE_HOMES[instance_name] + if self.TRACKER_HOMES.has_key(instance_name): + instance_home = self.TRACKER_HOMES[instance_name] instance = roundup.instance.open(instance_home) else: raise client.NotFound @@ -137,7 +137,7 @@ # Set up the CGI environment env = {} - env['INSTANCE_NAME'] = instance_name + env['TRACKER_NAME'] = instance_name env['REQUEST_METHOD'] = self.command env['PATH_INFO'] = urllib.unquote(rest) if query: @@ -181,7 +181,7 @@ instance home is the directory that was identified when you did "roundup-admin init". You may specify any number of these name=home pairs on the command-line. For convenience, you may edit the - ROUNDUP_INSTANCE_HOMES variable in the roundup-server file instead. + TRACKER_HOMES variable in the roundup-server file instead. ''')%locals() sys.exit(0) @@ -269,7 +269,7 @@ except ValueError: raise ValueError, _("Instances must be name=home") d[name] = home - RoundupRequestHandler.ROUNDUP_INSTANCE_HOMES = d + RoundupRequestHandler.TRACKER_HOMES = d except SystemExit: raise except:
--- a/roundup/templates/classic/config.py Tue Sep 10 02:37:28 2002 +0000 +++ b/roundup/templates/classic/config.py Tue Sep 10 03:01:20 2002 +0000 @@ -15,12 +15,12 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: config.py,v 1.1 2002-09-09 23:56:03 richard Exp $ +# $Id: config.py,v 1.2 2002-09-10 03:01:19 richard Exp $ import os # roundup home is this package's directory -INSTANCE_HOME=os.path.split(__file__)[0] +TRACKER_HOME=os.path.split(__file__)[0] # The SMTP mail host that roundup will use to send mail MAILHOST = 'localhost' @@ -29,19 +29,19 @@ MAIL_DOMAIN = 'your.tracker.email.domain.example' # This is the directory that the database is going to be stored in -DATABASE = os.path.join(INSTANCE_HOME, 'db') +DATABASE = os.path.join(TRACKER_HOME, 'db') # This is the directory that the HTML templates reside in -TEMPLATES = os.path.join(INSTANCE_HOME, 'html') +TEMPLATES = os.path.join(TRACKER_HOME, 'html') # A descriptive name for your roundup instance -INSTANCE_NAME = 'Roundup issue tracker' +TRACKER_NAME = 'Roundup issue tracker' # The email address that mail to roundup should go to -ISSUE_TRACKER_EMAIL = 'issue_tracker@%s'%MAIL_DOMAIN +TRACKER_EMAIL = 'issue_tracker@%s'%MAIL_DOMAIN # The web address that the instance is viewable at -ISSUE_TRACKER_WEB = 'http://your.tracker.url.example/' +TRACKER_WEB = 'http://your.tracker.url.example/' # The email address that roundup will complain to if it runs into trouble ADMIN_EMAIL = 'roundup-admin@%s'%MAIL_DOMAIN
--- a/roundup/templates/classic/html/home.classlist Tue Sep 10 02:37:28 2002 +0000 +++ b/roundup/templates/classic/html/home.classlist Tue Sep 10 03:01:20 2002 +0000 @@ -8,8 +8,8 @@ </th> </tr> <tr tal:repeat="prop cl/properties"> - <th tal:content="prop/name">name</th> - <td tal:content="prop/prop">type</td> + <th tal:content="prop/_name">name</th> + <td tal:content="prop/_prop">type</td> </tr> </tal:block>
--- a/scripts/roundup-reminder Tue Sep 10 02:37:28 2002 +0000 +++ b/scripts/roundup-reminder Tue Sep 10 03:01:20 2002 +0000 @@ -19,7 +19,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -# $Id: roundup-reminder,v 1.3 2002-09-10 01:07:06 richard Exp $ +# $Id: roundup-reminder,v 1.4 2002-09-10 03:01:19 richard Exp $ ''' Simple script that emails all users of a tracker with the issues that @@ -73,14 +73,14 @@ # generate the email message message = cStringIO.StringIO() writer = MimeWriter.MimeWriter(message) - writer.addheader('Subject', 'Your active %s issues'%db.config.INSTANCE_NAME) + writer.addheader('Subject', 'Your active %s issues'%db.config.TRACKER_NAME) writer.addheader('To', address) - writer.addheader('From', '%s <%s>'%(db.config.INSTANCE_NAME, + writer.addheader('From', '%s <%s>'%(db.config.TRACKER_NAME, db.config.ADMIN_EMAIL)) - writer.addheader('Reply-To', '%s <%s>'%(db.config.INSTANCE_NAME, + writer.addheader('Reply-To', '%s <%s>'%(db.config.TRACKER_NAME, db.config.ADMIN_EMAIL)) writer.addheader('MIME-Version', '1.0') - writer.addheader('X-Roundup-Name', db.config.INSTANCE_NAME) + writer.addheader('X-Roundup-Name', db.config.TRACKER_NAME) # start the multipart part = writer.startmultipartbody('alternative') @@ -110,7 +110,7 @@ %s and click on "My Issues". Do NOT respond to this message. -'''%db.config.ISSUE_TRACKER_WEB +'''%db.config.TRACKER_WEB # now the HTML one
--- a/test/test_db.py Tue Sep 10 02:37:28 2002 +0000 +++ b/test/test_db.py Tue Sep 10 03:01:20 2002 +0000 @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: test_db.py,v 1.43 2002-09-10 00:19:54 richard Exp $ +# $Id: test_db.py,v 1.44 2002-09-10 03:01:20 richard Exp $ import unittest, os, shutil, time @@ -54,9 +54,9 @@ DATABASE='_test_dir' MAILHOST = 'localhost' MAIL_DOMAIN = 'fill.me.in.' - INSTANCE_NAME = 'Roundup issue tracker' - ISSUE_TRACKER_EMAIL = 'issue_tracker@%s'%MAIL_DOMAIN - ISSUE_TRACKER_WEB = 'http://some.useful.url/' + TRACKER_NAME = 'Roundup issue tracker' + TRACKER_EMAIL = 'issue_tracker@%s'%MAIL_DOMAIN + TRACKER_WEB = 'http://some.useful.url/' ADMIN_EMAIL = 'roundup-admin@%s'%MAIL_DOMAIN FILTER_POSITION = 'bottom' # one of 'top', 'bottom', 'top and bottom' ANONYMOUS_ACCESS = 'deny' # either 'deny' or 'allow'
--- a/test/test_schema.py Tue Sep 10 02:37:28 2002 +0000 +++ b/test/test_schema.py Tue Sep 10 03:01:20 2002 +0000 @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: test_schema.py,v 1.9 2002-09-10 00:19:55 richard Exp $ +# $Id: test_schema.py,v 1.10 2002-09-10 03:01:20 richard Exp $ import unittest, os, shutil @@ -27,9 +27,9 @@ DATABASE='_test_dir' MAILHOST = 'localhost' MAIL_DOMAIN = 'fill.me.in.' - INSTANCE_NAME = 'Roundup issue tracker' - ISSUE_TRACKER_EMAIL = 'issue_tracker@%s'%MAIL_DOMAIN - ISSUE_TRACKER_WEB = 'http://some.useful.url/' + NSTANCE_NAME = 'Roundup issue tracker' + TRACKER_EMAIL = 'issue_tracker@%s'%MAIL_DOMAIN + TRACKER_WEB = 'http://some.useful.url/' ADMIN_EMAIL = 'roundup-admin@%s'%MAIL_DOMAIN FILTER_POSITION = 'bottom' # one of 'top', 'bottom', 'top and bottom' ANONYMOUS_ACCESS = 'deny' # either 'deny' or 'allow'
