diff --git a/roundup/hyperdb.py b/roundup/hyperdb.py
index 0386a7371fe6b154de8f2a2d928a49971de66ecc..9aa575ac63813004cce38c19c62f53cf26501a31 100644 (file)
--- a/roundup/hyperdb.py
+++ b/roundup/hyperdb.py
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#
-# $Id: hyperdb.py,v 1.56 2002-02-20 05:05:28 richard Exp $
+# $Id: hyperdb.py,v 1.58 2002-02-27 03:23:16 richard Exp $
__doc__ = """
Hyperdatabase implementation, especially field types.
"""
# standard python modules
-import cPickle, re, string, weakref, os
+import re, string, weakref, os
# roundup modules
import date, password
if node.has_key(self.db.RETIRED_FLAG):
raise IndexError
num_re = re.compile('^\d+$')
- set = {}
for key, value in propvalues.items():
# check to make sure we're not duplicating an existing key
if key == self.key and node[key] != value:
# if the value's the same as the existing value, no sense in
# doing anything
- if value == node[key]:
+ if node.has_key(key) and value == node[key]:
del propvalues[key]
continue
return self.cl.retire(self.nodeid)
-def Choice(name, *options):
- cl = Class(db, name, name=hyperdb.String(), order=hyperdb.String())
+def Choice(name, db, *options):
+ '''Quick helper to create a simple class with choices
+ '''
+ cl = Class(db, name, name=String(), order=String())
for i in range(len(options)):
- cl.create(name=option[i], order=i)
+ cl.create(name=options[i], order=i)
return hyperdb.Link(name)
#
# $Log: not supported by cvs2svn $
+# Revision 1.57 2002/02/20 05:23:24 richard
+# Didn't accomodate new values for new properties
+#
+# Revision 1.56 2002/02/20 05:05:28 richard
+# . Added simple editing for classes that don't define a templated interface.
+# - access using the admin "class list" interface
+# - limited to admin-only
+# - requires the csv module from object-craft (url given if it's missing)
+#
# Revision 1.55 2002/02/15 07:27:12 richard
# Oops, precedences around the way w0rng.
#