summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 702a6a5)
raw | patch | inline | side by side (parent: 702a6a5)
author | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Sat, 29 Sep 2001 13:27:00 +0000 (13:27 +0000) | ||
committer | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Sat, 29 Sep 2001 13:27:00 +0000 (13:27 +0000) |
serve.
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@260 57a73879-2fb5-44c3-a270-3262357dd7e2
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@260 57a73879-2fb5-44c3-a270-3262357dd7e2
cgi-bin/roundup.cgi | patch | blob | history | |
roundup-server | patch | blob | history | |
roundup/backends/back_anydbm.py | patch | blob | history | |
roundup/cgitb.py | patch | blob | history |
diff --git a/cgi-bin/roundup.cgi b/cgi-bin/roundup.cgi
index 7e7f3e1a76f922b90fe8d2bbf6ec8a631abd7ba0..5dbf3d50719f4669d7ac6dc3df5a74dc6b3627f5 100755 (executable)
--- a/cgi-bin/roundup.cgi
+++ b/cgi-bin/roundup.cgi
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#
-# $Id: roundup.cgi,v 1.10 2001-08-07 00:24:42 richard Exp $
+# $Id: roundup.cgi,v 1.11 2001-09-29 13:27:00 richard Exp $
# python version check
import sys
out.write('Status: 403\n\n')
out.write('Unauthorised')
+def index(out):
+ ''' Print up an index of the available instances
+ '''
+ w = out.write
+ w("Content-Type: text/html\n\n")
+ w('<html><head><title>Roundup instances index</title><head>\n')
+ w('<body><h1>Roundup instances index</h1><ol>\n')
+ for instance in ROUNDUP_INSTANCE_HOMES.keys():
+ w('<li><a href="%s/index">%s</a>\n'%(urllib.quote(instance),
+ instance))
+ w('</ol></body></html>')
+
#
# Now do the actual CGI handling
#
if ROUNDUP_INSTANCE_HOMES.has_key(instance):
instance_home = ROUNDUP_INSTANCE_HOMES[instance]
instance = roundup.instance.open(instance_home)
+ main(instance, out)
else:
- raise ValueError, 'No such instance "%s"'%instance
- main(instance, out)
+ index()
except:
sys.stdout, sys.stderr = out, err
out.write('Content-Type: text/html\n\n')
#
# $Log: not supported by cvs2svn $
+# Revision 1.10 2001/08/07 00:24:42 richard
+# stupid typo
+#
# Revision 1.9 2001/08/07 00:15:51 richard
# Added the copyright/license notice to (nearly) all files at request of
# Bizar Software.
diff --git a/roundup-server b/roundup-server
index 88afa89519057c7fb53446458a3d27a5d5fb2182..fb905d17c58298a2ca484ba1f616275e2f90e442 100755 (executable)
--- a/roundup-server
+++ b/roundup-server
Based on CGIHTTPServer in the Python library.
-$Id: roundup-server,v 1.11 2001-08-07 00:24:42 richard Exp $
+$Id: roundup-server,v 1.12 2001-09-29 13:27:00 richard Exp $
"""
import sys
self.wfile.write("</pre>\n")
sys.stdin = save_stdin
+ def index(self):
+ ''' Print up an index of the available instances
+ '''
+ w = self.wfile.write
+ w("Content-Type: text/html\n\n")
+ 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():
+ w('<li><a href="%s/index">%s</a>\n'%(urllib.quote(instance),
+ instance))
+ w('</ol></body></html>')
+
def inner_run_cgi(self):
''' This is the inner part of the CGI handling
'''
# figure the instance
if rest == '/':
- raise ValueError, 'No instance specified'
+ return self.index()
l_path = string.split(rest, '/')
instance = urllib.unquote(l_path[1])
if self.ROUNDUP_INSTANCE_HOMES.has_key(instance):
instance_home = self.ROUNDUP_INSTANCE_HOMES[instance]
instance = roundup.instance.open(instance_home)
else:
- raise ValueError, 'No such instance "%s"'%instance
+ return self.index()
# figure out what the rest of the path is
if len(l_path) > 2:
#
# $Log: not supported by cvs2svn $
+# Revision 1.11 2001/08/07 00:24:42 richard
+# stupid typo
+#
# Revision 1.10 2001/08/07 00:15:51 richard
# Added the copyright/license notice to (nearly) all files at request of
# Bizar Software.
index 36fb3df7c33e6e11394c09d5c6bd75464c482563..9f3124081171957316d70e5a67caf0f5064bac45 100644 (file)
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#
-#$Id: back_anydbm.py,v 1.7 2001-08-12 06:32:36 richard Exp $
+#$Id: back_anydbm.py,v 1.8 2001-09-29 13:27:00 richard Exp $
import anydbm, os, marshal
from roundup import hyperdb, date
"""
self.dir, self.journaltag = storagelocator, journaltag
self.classes = {}
+ self.transactions = []
#
# Classes
#
# Basic transaction support
#
- # TODO: well, write these methods (and then use them in other code)
- def register_action(self):
- ''' Register an action to the transaction undo log
- '''
-
def commit(self):
- ''' Commit the current transaction, start a new one
+ ''' Commit the current transactions.
'''
+ # lock the DB
+ for action, classname, entry in self.transactions:
+ # write the node, figure what's changed for the journal.
+ pass
+ # unlock the DB
def rollback(self):
- ''' Reverse all actions from the current transaction
+ ''' Reverse all actions from the current transaction.
'''
+ self.transactions = []
#
#$Log: not supported by cvs2svn $
+#Revision 1.7 2001/08/12 06:32:36 richard
+#using isinstance(blah, Foo) now instead of isFooType
+#
#Revision 1.6 2001/08/07 00:24:42 richard
#stupid typo
#
diff --git a/roundup/cgitb.py b/roundup/cgitb.py
index 8519a97215b16cc3743c6805db9c834d1d82fbfc..9c9d0ed0ea9c3ead17ca83121997c1418d967c33 100644 (file)
--- a/roundup/cgitb.py
+++ b/roundup/cgitb.py
#
-# Copyright (c) 2001 Bizar Software Pty Ltd (http://www.bizarsoftware.com.au/)
-# This module is free software, and you may redistribute it and/or modify
-# under the same terms as Python, so long as this copyright message and
-# disclaimer are retained in their original form.
-#
-# IN NO EVENT SHALL BIZAR SOFTWARE PTY LTD BE LIABLE TO ANY PARTY FOR
-# DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING
-# OUT OF THE USE OF THIS CODE, EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-# BIZAR SOFTWARE PTY LTD SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
-# BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS"
-# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
-# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+# This module was written by Ka-Ping Yee, <ping@lfw.org>.
#
-# $Id: cgitb.py,v 1.5 2001-08-07 00:24:42 richard Exp $
+# $Id: cgitb.py,v 1.6 2001-09-29 13:27:00 richard Exp $
import sys, os, types, string, keyword, linecache, tokenize, inspect, pydoc
#
# $Log: not supported by cvs2svn $
+# Revision 1.5 2001/08/07 00:24:42 richard
+# stupid typo
+#
# Revision 1.4 2001/08/07 00:15:51 richard
# Added the copyright/license notice to (nearly) all files at request of
# Bizar Software.