Mercurial > p > roundup > code
diff frontends/ZRoundup/ZRoundup.py @ 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 | 7cf56f5b3991 |
| children | 908c27314abf |
line wrap: on
line diff
--- a/frontends/ZRoundup/ZRoundup.py Tue Jul 27 00:45:49 2004 +0000 +++ b/frontends/ZRoundup/ZRoundup.py Tue Jul 27 00:57:19 2004 +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.18 2004-07-21 04:50:40 richard Exp $ +# $Id: ZRoundup.py,v 1.19 2004-07-27 00:57:17 richard Exp $ # ''' ZRoundup module - exposes the roundup web interface to Zope @@ -40,7 +40,7 @@ modulesecurity = ModuleSecurityInfo() import roundup.instance -from roundup.cgi.client import NotFound +from roundup.cgi import client modulesecurity.declareProtected('View management screens', 'manage_addZRoundupForm') @@ -139,7 +139,7 @@ def roundup_opendb(self): '''Open the roundup instance database for a transaction. ''' - instance = roundup.instance.open(self.instance_home) + tracker = roundup.instance.open(self.instance_home) request = RequestWrapper(self.REQUEST['RESPONSE']) env = self.REQUEST.environ @@ -159,7 +159,9 @@ env['TRACKER_NAME'] = path_components[-1] form = FormWrapper(self.REQUEST.form) - return instance.Client(instance, request, env, form) + if hasattr(tracker, 'Client'): + return tracker.Client(tracker, request, env, form) + return client.Client(tracker, request, env, form) security.declareProtected('View', 'index_html') def index_html(self): @@ -208,7 +210,7 @@ # and call roundup to do something client.main() return '' - except NotFound: + except client.NotFound: raise 'NotFound', REQUEST.URL pass except:
