rem
stringlengths 0
322k
| add
stringlengths 0
2.05M
| context
stringlengths 8
228k
|
---|---|---|
old = label; cell.append('%s: %s' % (k,old)) if current.has_key(k): cell[-1] += ' -> %s'%current[k] current[k] = old elif isinstance(prop, hyperdb.Date) and args[k]: d = date.Date(args[k]).local(timezone) cell.append('%s: %s'%(k, str(d))) if current.has_key(k): cell[-1] += ' -> %s' % current[k] current[k] = str(d) elif isinstance(prop, hyperdb.Interval) and args[k]: d = date.Interval(args[k]) cell.append('%s: %s'%(k, str(d)))
|
if hrefable: subml.append('<a href="%s%s">%s</a>'%( classname, linkid, label)) else: subml.append(label) ml.append(sublabel + ', '.join(subml)) cell.append('%s:\n %s'%(k, ', '.join(ml))) elif isinstance(prop, hyperdb.Link) and args[k]: label = classname + args[k] if labelprop is not None and labelprop != 'id': try: label = linkcl.get(args[k], labelprop) except IndexError: comments['no_link'] = _('''<strike>The linked node no longer exists</strike>''') cell.append(' <strike>%s</strike>,\n'%label) label = None if label is not None: if hrefable: old = '<a href="%s%s">%s</a>'%(classname, args[k], label) else: old = label; cell.append('%s: %s' % (k,old))
|
def history(self, direction='descending', dre=re.compile('\d+')): l = ['<table class="history">' '<tr><th colspan="4" class="header">', _('History'), '</th></tr><tr>', _('<th>Date</th>'), _('<th>User</th>'), _('<th>Action</th>'), _('<th>Args</th>'), '</tr>'] current = {} comments = {} history = self._klass.history(self._nodeid) history.sort() timezone = self._db.getUserTimezone() if direction == 'descending': history.reverse() for prop_n in self._props.keys(): prop = self[prop_n] if isinstance(prop, HTMLProperty): current[prop_n] = prop.plain() # make link if hrefable if (self._props.has_key(prop_n) and isinstance(self._props[prop_n], hyperdb.Link)): classname = self._props[prop_n].classname try: find_template(self._db.config.TEMPLATES, classname, 'item') except NoTemplate: pass else: id = self._klass.get(self._nodeid, prop_n, None) current[prop_n] = '<a href="%s%s">%s</a>'%( classname, id, current[prop_n])
|
current[k] = str(d) elif isinstance(prop, hyperdb.String) and args[k]: cell.append('%s: %s'%(k, cgi.escape(args[k]))) if current.has_key(k): cell[-1] += ' -> %s'%current[k] current[k] = cgi.escape(args[k]) elif not args[k]: if current.has_key(k): cell.append('%s: %s'%(k, current[k])) current[k] = '(no value)' else: cell.append('%s: (no value)'%k)
|
current[k] = old elif isinstance(prop, hyperdb.Date) and args[k]: d = date.Date(args[k]).local(timezone) cell.append('%s: %s'%(k, str(d))) if current.has_key(k): cell[-1] += ' -> %s' % current[k] current[k] = str(d) elif isinstance(prop, hyperdb.Interval) and args[k]: d = date.Interval(args[k]) cell.append('%s: %s'%(k, str(d))) if current.has_key(k): cell[-1] += ' -> %s'%current[k] current[k] = str(d) elif isinstance(prop, hyperdb.String) and args[k]: cell.append('%s: %s'%(k, cgi.escape(args[k]))) if current.has_key(k): cell[-1] += ' -> %s'%current[k] current[k] = cgi.escape(args[k]) elif not args[k]: if current.has_key(k): cell.append('%s: %s'%(k, current[k])) current[k] = '(no value)'
|
def history(self, direction='descending', dre=re.compile('\d+')): l = ['<table class="history">' '<tr><th colspan="4" class="header">', _('History'), '</th></tr><tr>', _('<th>Date</th>'), _('<th>User</th>'), _('<th>Action</th>'), _('<th>Args</th>'), '</tr>'] current = {} comments = {} history = self._klass.history(self._nodeid) history.sort() timezone = self._db.getUserTimezone() if direction == 'descending': history.reverse() for prop_n in self._props.keys(): prop = self[prop_n] if isinstance(prop, HTMLProperty): current[prop_n] = prop.plain() # make link if hrefable if (self._props.has_key(prop_n) and isinstance(self._props[prop_n], hyperdb.Link)): classname = self._props[prop_n].classname try: find_template(self._db.config.TEMPLATES, classname, 'item') except NoTemplate: pass else: id = self._klass.get(self._nodeid, prop_n, None) current[prop_n] = '<a href="%s%s">%s</a>'%( classname, id, current[prop_n])
|
cell.append('%s: %s'%(k, str(args[k]))) if current.has_key(k): cell[-1] += ' -> %s'%current[k] current[k] = str(args[k])
|
cell.append('%s: (no value)'%k)
|
def history(self, direction='descending', dre=re.compile('\d+')): l = ['<table class="history">' '<tr><th colspan="4" class="header">', _('History'), '</th></tr><tr>', _('<th>Date</th>'), _('<th>User</th>'), _('<th>Action</th>'), _('<th>Args</th>'), '</tr>'] current = {} comments = {} history = self._klass.history(self._nodeid) history.sort() timezone = self._db.getUserTimezone() if direction == 'descending': history.reverse() for prop_n in self._props.keys(): prop = self[prop_n] if isinstance(prop, HTMLProperty): current[prop_n] = prop.plain() # make link if hrefable if (self._props.has_key(prop_n) and isinstance(self._props[prop_n], hyperdb.Link)): classname = self._props[prop_n].classname try: find_template(self._db.config.TEMPLATES, classname, 'item') except NoTemplate: pass else: id = self._klass.get(self._nodeid, prop_n, None) current[prop_n] = '<a href="%s%s">%s</a>'%( classname, id, current[prop_n])
|
comments['no_exist'] = _('''<em>The indicated property no longer exists</em>''') cell.append('<em>%s: %s</em>\n'%(k, str(args[k])))
|
cell.append('%s: %s'%(k, str(args[k]))) if current.has_key(k): cell[-1] += ' -> %s'%current[k] current[k] = str(args[k])
|
def history(self, direction='descending', dre=re.compile('\d+')): l = ['<table class="history">' '<tr><th colspan="4" class="header">', _('History'), '</th></tr><tr>', _('<th>Date</th>'), _('<th>User</th>'), _('<th>Action</th>'), _('<th>Args</th>'), '</tr>'] current = {} comments = {} history = self._klass.history(self._nodeid) history.sort() timezone = self._db.getUserTimezone() if direction == 'descending': history.reverse() for prop_n in self._props.keys(): prop = self[prop_n] if isinstance(prop, HTMLProperty): current[prop_n] = prop.plain() # make link if hrefable if (self._props.has_key(prop_n) and isinstance(self._props[prop_n], hyperdb.Link)): classname = self._props[prop_n].classname try: find_template(self._db.config.TEMPLATES, classname, 'item') except NoTemplate: pass else: id = self._klass.get(self._nodeid, prop_n, None) current[prop_n] = '<a href="%s%s">%s</a>'%( classname, id, current[prop_n])
|
value=self.activity) + '\n' + \
|
value=self.activity.local(0)) + '\n' + \
|
def submit(self, label="Submit Changes"): """Generate a submit button.
|
return str(self._value.local(self._db.getUserTimezone()))
|
if self._offset is None: offset = self._db.getUserTimezone() else: offset = self._offset return str(self._value.local(offset))
|
def plain(self): ''' Render a "plain" representation of the property ''' self.view_check()
|
self._prop, self._formname, self._value.local(offset))
|
self._prop, self._formname, self._value, offset=offset)
|
def local(self, offset): ''' Return the date/time as a local (timezone offset) date/time. ''' self.view_check()
|
def hasPermission(self, permission, classname=_marker):
|
def hasPermission(self, permission, classname=_marker, itemid=None):
|
def hasPermission(self, permission, classname=_marker): """Check whether the user has 'permission' on the current class.""" if classname is self._marker: classname = self.client.classname return self.db.security.hasPermission(permission, self.client.userid, classname)
|
classname)
|
classname=classname, itemid=itemid)
|
def hasPermission(self, permission, classname=_marker): """Check whether the user has 'permission' on the current class.""" if classname is self._marker: classname = self.client.classname return self.db.security.hasPermission(permission, self.client.userid, classname)
|
if self.hasPermission('Edit'):
|
if self.hasPermission('Edit', itemid=self.nodeid):
|
def editItemPermission(self, props): """Determine whether the user has permission to edit this item.
|
y,m,d,H,M,S,x,x,x = time.gmtime()
|
y,m,d,H,M,S,x,x,x = time.gmtime(time.time())
|
def set(self, spec, offset=0, date_re=re.compile(r''' (((?P<y>\d\d\d\d)-)?((?P<m>\d\d)-(?P<d>\d\d))?)? # yyyy-mm-dd (?P<n>\.)? # . (((?P<H>\d?\d):(?P<M>\d\d))?(:(?P<S>\d\d))?)? # hh:mm:ss (?P<o>.+)? # offset ''', re.VERBOSE)): ''' set the date to the value in spec ''' m = date_re.match(spec) if not m: raise ValueError, 'Not a date spec: [[yyyy-]mm-dd].[[h]h:mm[:ss]] [offset]' info = m.groupdict()
|
client.split_path = [item]
|
client.path = item
|
def __getitem__(self, item): '''All other URL accesses are passed throuh to roundup ''' try: client = self._opendb() # fake the path that roundup should use client.split_path = [item] # and call roundup to do something client.main() return '' except NotFound: raise 'NotFound', self.REQUEST.URL pass except: import traceback traceback.print_exc() # all other exceptions in roundup are valid raise raise KeyError, item
|
for idir in '. detectors html'.split():
|
for idir in '. detectors extensions html'.split():
|
def main(): # build list of scripts from their implementation modules roundup_scripts = map(scriptname, glob('roundup/scripts/[!_]*.py')) # template munching packagelist = [ 'roundup', 'roundup.cgi', 'roundup.cgi.PageTemplates', 'roundup.cgi.TAL', 'roundup.cgi.ZTUtils', 'roundup.backends', 'roundup.scripts' ] installdatafiles = [ ('share/roundup/cgi-bin', ['cgi-bin/roundup.cgi']), ] # install man pages on POSIX platforms if os.name == 'posix': installdatafiles.append(('man/man1', ['doc/roundup-admin.1', 'doc/roundup-mailgw.1', 'doc/roundup-server.1'])) # add the templates to the data files lists from roundup.init import listTemplates templates = [t['path'] for t in listTemplates('templates').values()] for tdir in templates: # scan for data files for idir in '. detectors html'.split(): idir = os.path.join(tdir, idir) tfiles = [] for f in os.listdir(idir): if f.startswith('.'): continue ifile = os.path.join(idir, f) if os.path.isfile(ifile): tfiles.append(ifile) installdatafiles.append( (os.path.join('share', 'roundup', idir), tfiles) ) # add message files for (_dist_file, _mo_file) in list_message_files(): installdatafiles.append((os.path.dirname(_mo_file), [os.path.join("build", _mo_file)])) # perform the setup action from roundup import __version__ setup( name = "roundup", version = __version__, description = "A simple-to-use and -install issue-tracking system" " with command-line, web and e-mail interfaces. Highly" " customisable.", long_description =
|
def determine_db_type(self, path): ''' determine which DB wrote the class file
|
def cache_db_type(self, path): ''' determine which DB wrote the class file, and cache it as an attribute of __class__ (to allow for subclassed DBs to be different sorts)
|
def determine_db_type(self, path): ''' determine which DB wrote the class file ''' db_type = '' if os.path.exists(path): db_type = whichdb.whichdb(path) if not db_type: raise hyperdb.DatabaseError, "Couldn't identify database type" elif os.path.exists(path+'.db'): # if the path ends in '.db', it's a dbm database, whether # anydbm says it's dbhash or not! db_type = 'dbm' return db_type
|
return db_type
|
self.__class__._db_type = db_type
|
def determine_db_type(self, path): ''' determine which DB wrote the class file ''' db_type = '' if os.path.exists(path): db_type = whichdb.whichdb(path) if not db_type: raise hyperdb.DatabaseError, "Couldn't identify database type" elif os.path.exists(path+'.db'): # if the path ends in '.db', it's a dbm database, whether # anydbm says it's dbhash or not! db_type = 'dbm' return db_type
|
db_type = self.determine_db_type(path)
|
if self._db_type is None: self.cache_db_type(path) db_type = self._db_type
|
def opendb(self, mode): '''Low-level database opener that gets around anydbm/dbm eccentricities. ''' # figure the class db type path = os.path.join(os.getcwd(), self.dir, self.name) db_type = self.determine_db_type(path)
|
'login': 'login_action',
|
'login': 'loginAction',
|
def content(self): ''' Callback used by the page template to render the content of the page.
|
"login" -> self.login_action
|
"login" -> self.loginAction
|
def handle_action(self): ''' Determine whether there should be an _action called.
|
def login_action(self): ''' Attempt to log a user in and set the cookie
|
def loginAction(self): ''' Attempt to log a user in. Sets up a session for the user which contains the login credentials.
|
def login_action(self): ''' Attempt to log a user in and set the cookie ''' # we need the username at a minimum if not self.form.has_key('__login_name'): self.error_message.append(_('Username required')) return
|
if not self.loginPermission(): self.make_user_anonymous() raise Unauthorised, _("You do not have permission to login")
|
def login_action(self): ''' Attempt to log a user in and set the cookie ''' # we need the username at a minimum if not self.form.has_key('__login_name'): self.error_message.append(_('Username required')) return
|
|
if (self.db.config.MESSAGES_TO_AUTHOR == 'yes' and users.get(authid, 'username') != 'anonymous'): sendto.append(authid)
|
if (users.get(authid, 'username') != 'anonymous' and not r.has_key(authid)): if self.db.config.MESSAGES_TO_AUTHOR == 'yes': sendto.append(authid) recipients.append(authid) elif self.db.config.MESSAGES_TO_AUTHOR == 'new' and not oldvalues: sendto.append(authid) recipients.append(authid)
|
def nosymessage(self, nodeid, msgid, oldvalues, whichnosy='nosy', from_address=None, cc=[]): #, bcc=[]): """Send a message to the members of an issue's nosy list.
|
'if NOT "%%_4ver%%" == "" "%(python)s" -O -c "from %(package)s.scripts.%(module)s import run; run()" %%$\n' 'if "%%_4ver%%" == "" "%(python)s" -O -c "from %(package)s.scripts.%(module)s import run; run()" %%*\n'
|
'if NOT "%%_4ver%%" == "" "%(python)s" -c "from %(package)s.scripts.%(module)s import run; run()" %%$\n' 'if "%%_4ver%%" == "" "%(python)s" -c "from %(package)s.scripts.%(module)s import run; run()" %%*\n'
|
def copy_scripts(self): """ Create each script listed in 'self.scripts' """ if not self.package_name: raise Exception("You have to inherit build_scripts_create and" " provide a package name")
|
pass
|
mindate = int(calendar.timegm(pack_before.get_tuple())) i = 0 while i < len(self.hist): if self.hist[i].date < mindate and self.hist[i].action != _CREATE: self.hist.delete(i) else: i = i + 1
|
def pack(self, pack_before): pass
|
def addjournal(self, tablenm, nodeid, action, params): tblid = self.tables.find(name=tablenm)
|
def addjournal(self, tablenm, nodeid, action, params, creator=None, creation=None): try: tblid = self.tables.find(name=tablenm) except ValueError: open('/u/roundup-sf/roundup/error.out','w').write('\nself.tables=%s, tablenm=%s\n' % (self.tables.structure(), tablenm)) raise
|
def addjournal(self, tablenm, nodeid, action, params): tblid = self.tables.find(name=tablenm) if tblid == -1: tblid = self.tables.append(name=tablenm) # tableid:I,nodeid:I,date:I,user:I,action:I,params:B self.hist.append(tableid=tblid, nodeid=int(nodeid), date=int(time.time()), action=action, user = self.curuserid, params = marshal.dumps(params))
|
date=int(time.time()),
|
date=creation,
|
def addjournal(self, tablenm, nodeid, action, params): tblid = self.tables.find(name=tablenm) if tblid == -1: tblid = self.tables.append(name=tablenm) # tableid:I,nodeid:I,date:I,user:I,action:I,params:B self.hist.append(tableid=tblid, nodeid=int(nodeid), date=int(time.time()), action=action, user = self.curuserid, params = marshal.dumps(params))
|
user = self.curuserid,
|
user = creator,
|
def addjournal(self, tablenm, nodeid, action, params): tblid = self.tables.find(name=tablenm) if tblid == -1: tblid = self.tables.append(name=tablenm) # tableid:I,nodeid:I,date:I,user:I,action:I,params:B self.hist.append(tableid=tblid, nodeid=int(nodeid), date=int(time.time()), action=action, user = self.curuserid, params = marshal.dumps(params))
|
def gethistory(self, tablenm, nodeid):
|
def getjournal(self, tablenm, nodeid):
|
def gethistory(self, tablenm, nodeid): rslt = [] tblid = self.tables.find(name=tablenm) if tblid == -1: return rslt q = self.hist.select(tableid=tblid, nodeid=int(nodeid)) i = 0 userclass = self.getclass('user') for row in q: try: params = marshal.loads(row.params) except ValueError: print "history couldn't unmarshal %r" % row.params params = {} usernm = userclass.get(str(row.user), 'username') dt = date.Date(time.gmtime(row.date)) rslt.append((i, dt, usernm, _actionnames[row.action], params)) i += 1 return rslt
|
userclass = self.getclass('user')
|
def gethistory(self, tablenm, nodeid): rslt = [] tblid = self.tables.find(name=tablenm) if tblid == -1: return rslt q = self.hist.select(tableid=tblid, nodeid=int(nodeid)) i = 0 userclass = self.getclass('user') for row in q: try: params = marshal.loads(row.params) except ValueError: print "history couldn't unmarshal %r" % row.params params = {} usernm = userclass.get(str(row.user), 'username') dt = date.Date(time.gmtime(row.date)) rslt.append((i, dt, usernm, _actionnames[row.action], params)) i += 1 return rslt
|
|
usernm = userclass.get(str(row.user), 'username')
|
def gethistory(self, tablenm, nodeid): rslt = [] tblid = self.tables.find(name=tablenm) if tblid == -1: return rslt q = self.hist.select(tableid=tblid, nodeid=int(nodeid)) i = 0 userclass = self.getclass('user') for row in q: try: params = marshal.loads(row.params) except ValueError: print "history couldn't unmarshal %r" % row.params params = {} usernm = userclass.get(str(row.user), 'username') dt = date.Date(time.gmtime(row.date)) rslt.append((i, dt, usernm, _actionnames[row.action], params)) i += 1 return rslt
|
|
rslt.append((i, dt, usernm, _actionnames[row.action], params)) i += 1
|
rslt.append((nodeid, dt, str(row.user), _actionnames[row.action], params))
|
def gethistory(self, tablenm, nodeid): rslt = [] tblid = self.tables.find(name=tablenm) if tblid == -1: return rslt q = self.hist.select(tableid=tblid, nodeid=int(nodeid)) i = 0 userclass = self.getclass('user') for row in q: try: params = marshal.loads(row.params) except ValueError: print "history couldn't unmarshal %r" % row.params params = {} usernm = userclass.get(str(row.user), 'username') dt = date.Date(time.gmtime(row.date)) rslt.append((i, dt, usernm, _actionnames[row.action], params)) i += 1 return rslt
|
if type(value) != _LISTTYPE:
|
if value is not None and type(value) != _LISTTYPE:
|
def set(self, nodeid, **propvalues): isnew = 0 if propvalues.has_key('#ISNEW'): isnew = 1 del propvalues['#ISNEW'] if not isnew: self.fireAuditors('set', nodeid, propvalues) if not propvalues: return propvalues if propvalues.has_key('id'): raise KeyError, '"id" is reserved' if self.db.journaltag is None: raise hyperdb.DatabaseError, 'Database open read-only' view = self.getview(1) # node must exist & not be retired id = int(nodeid) ndx = view.find(id=id) if ndx < 0: raise IndexError, "%s has no node %s" % (self.classname, nodeid) row = view[ndx] if row._isdel: raise IndexError, "%s has no node %s" % (self.classname, nodeid) oldnode = self.uncommitted.setdefault(id, {}) changes = {}
|
if not isinstance(value, password.Password):
|
if value is not None and not isinstance(value, password.Password):
|
def set(self, nodeid, **propvalues): isnew = 0 if propvalues.has_key('#ISNEW'): isnew = 1 del propvalues['#ISNEW'] if not isnew: self.fireAuditors('set', nodeid, propvalues) if not propvalues: return propvalues if propvalues.has_key('id'): raise KeyError, '"id" is reserved' if self.db.journaltag is None: raise hyperdb.DatabaseError, 'Database open read-only' view = self.getview(1) # node must exist & not be retired id = int(nodeid) ndx = view.find(id=id) if ndx < 0: raise IndexError, "%s has no node %s" % (self.classname, nodeid) row = view[ndx] if row._isdel: raise IndexError, "%s has no node %s" % (self.classname, nodeid) oldnode = self.uncommitted.setdefault(id, {}) changes = {}
|
elif value is not None and isinstance(prop, hyperdb.Date): if not isinstance(value, date.Date):
|
elif isinstance(prop, hyperdb.Date): if value is not None and not isinstance(value, date.Date):
|
def set(self, nodeid, **propvalues): isnew = 0 if propvalues.has_key('#ISNEW'): isnew = 1 del propvalues['#ISNEW'] if not isnew: self.fireAuditors('set', nodeid, propvalues) if not propvalues: return propvalues if propvalues.has_key('id'): raise KeyError, '"id" is reserved' if self.db.journaltag is None: raise hyperdb.DatabaseError, 'Database open read-only' view = self.getview(1) # node must exist & not be retired id = int(nodeid) ndx = view.find(id=id) if ndx < 0: raise IndexError, "%s has no node %s" % (self.classname, nodeid) row = view[ndx] if row._isdel: raise IndexError, "%s has no node %s" % (self.classname, nodeid) oldnode = self.uncommitted.setdefault(id, {}) changes = {}
|
setattr(row, key, int(calendar.timegm(value.get_tuple())))
|
if value is None: setattr(row, key, 0) else: setattr(row, key, int(calendar.timegm(value.get_tuple())))
|
def set(self, nodeid, **propvalues): isnew = 0 if propvalues.has_key('#ISNEW'): isnew = 1 del propvalues['#ISNEW'] if not isnew: self.fireAuditors('set', nodeid, propvalues) if not propvalues: return propvalues if propvalues.has_key('id'): raise KeyError, '"id" is reserved' if self.db.journaltag is None: raise hyperdb.DatabaseError, 'Database open read-only' view = self.getview(1) # node must exist & not be retired id = int(nodeid) ndx = view.find(id=id) if ndx < 0: raise IndexError, "%s has no node %s" % (self.classname, nodeid) row = view[ndx] if row._isdel: raise IndexError, "%s has no node %s" % (self.classname, nodeid) oldnode = self.uncommitted.setdefault(id, {}) changes = {}
|
elif value is not None and isinstance(prop, hyperdb.Interval): if not isinstance(value, date.Interval):
|
elif isinstance(prop, hyperdb.Interval): if value is not None and not isinstance(value, date.Interval):
|
def set(self, nodeid, **propvalues): isnew = 0 if propvalues.has_key('#ISNEW'): isnew = 1 del propvalues['#ISNEW'] if not isnew: self.fireAuditors('set', nodeid, propvalues) if not propvalues: return propvalues if propvalues.has_key('id'): raise KeyError, '"id" is reserved' if self.db.journaltag is None: raise hyperdb.DatabaseError, 'Database open read-only' view = self.getview(1) # node must exist & not be retired id = int(nodeid) ndx = view.find(id=id) if ndx < 0: raise IndexError, "%s has no node %s" % (self.classname, nodeid) row = view[ndx] if row._isdel: raise IndexError, "%s has no node %s" % (self.classname, nodeid) oldnode = self.uncommitted.setdefault(id, {}) changes = {}
|
setattr(row, key, str(value))
|
if value is None: setattr(row, key, '') else: setattr(row, key, str(value))
|
def set(self, nodeid, **propvalues): isnew = 0 if propvalues.has_key('#ISNEW'): isnew = 1 del propvalues['#ISNEW'] if not isnew: self.fireAuditors('set', nodeid, propvalues) if not propvalues: return propvalues if propvalues.has_key('id'): raise KeyError, '"id" is reserved' if self.db.journaltag is None: raise hyperdb.DatabaseError, 'Database open read-only' view = self.getview(1) # node must exist & not be retired id = int(nodeid) ndx = view.find(id=id) if ndx < 0: raise IndexError, "%s has no node %s" % (self.classname, nodeid) row = view[ndx] if row._isdel: raise IndexError, "%s has no node %s" % (self.classname, nodeid) oldnode = self.uncommitted.setdefault(id, {}) changes = {}
|
elif value is not None and isinstance(prop, hyperdb.Number): setattr(row, key, int(value))
|
elif isinstance(prop, hyperdb.Number): if value is None: value = 0 try: v = int(value) except ValueError: raise TypeError, "%s (%s) is not numeric" % (key, repr(value)) setattr(row, key, v)
|
def set(self, nodeid, **propvalues): isnew = 0 if propvalues.has_key('#ISNEW'): isnew = 1 del propvalues['#ISNEW'] if not isnew: self.fireAuditors('set', nodeid, propvalues) if not propvalues: return propvalues if propvalues.has_key('id'): raise KeyError, '"id" is reserved' if self.db.journaltag is None: raise hyperdb.DatabaseError, 'Database open read-only' view = self.getview(1) # node must exist & not be retired id = int(nodeid) ndx = view.find(id=id) if ndx < 0: raise IndexError, "%s has no node %s" % (self.classname, nodeid) row = view[ndx] if row._isdel: raise IndexError, "%s has no node %s" % (self.classname, nodeid) oldnode = self.uncommitted.setdefault(id, {}) changes = {}
|
elif value is not None and isinstance(prop, hyperdb.Boolean): bv = value != 0
|
elif isinstance(prop, hyperdb.Boolean): if value is None: bv = 0 elif value not in (0,1): raise TypeError, "%s (%s) is not boolean" % (key, repr(value)) else: bv = value
|
def set(self, nodeid, **propvalues): isnew = 0 if propvalues.has_key('#ISNEW'): isnew = 1 del propvalues['#ISNEW'] if not isnew: self.fireAuditors('set', nodeid, propvalues) if not propvalues: return propvalues if propvalues.has_key('id'): raise KeyError, '"id" is reserved' if self.db.journaltag is None: raise hyperdb.DatabaseError, 'Database open read-only' view = self.getview(1) # node must exist & not be retired id = int(nodeid) ndx = view.find(id=id) if ndx < 0: raise IndexError, "%s has no node %s" % (self.classname, nodeid) row = view[ndx] if row._isdel: raise IndexError, "%s has no node %s" % (self.classname, nodeid) oldnode = self.uncommitted.setdefault(id, {}) changes = {}
|
return self.db.gethistory(self.classname, nodeid)
|
return self.db.getjournal(self.classname, nodeid)
|
def history(self, nodeid): if not self.do_journal: raise ValueError, 'Journalling is disabled for this class' return self.db.gethistory(self.classname, nodeid)
|
def destroy(self, keyvalue): iv = self.getindexview() if iv: ndx = iv.find(k=keyvalue) if ndx > -1: id = iv[ndx].i iv.delete(ndx) view = self.getview() ndx = view.find(id=id) if ndx > -1: view.delete(ndx)
|
def destroy(self, id): view = self.getview(1) ndx = view.find(id=int(id)) if ndx > -1: if self.keyname: keyvalue = getattr(view[ndx], self.keyname) iv = self.getindexview(1) if iv: ivndx = iv.find(k=keyvalue) if ivndx > -1: iv.delete(ivndx) view.delete(ndx) self.db.destroyjournal(self.classname, id) self.db.dirty = 1
|
def destroy(self, keyvalue): #TODO clean this up once Richard's said how it should work iv = self.getindexview() if iv: ndx = iv.find(k=keyvalue) if ndx > -1: id = iv[ndx].i iv.delete(ndx) view = self.getview() ndx = view.find(id=id) if ndx > -1: view.delete(ndx)
|
vals = (setid, spec.classname)
|
vals = (setid, classname)
|
def setid(self, classname, setid): ''' Set the id counter: used during import of database ''' cursor = self.conn.cursor() sql = 'update ids set num=%s where name=%s'%(self.arg, self.arg) vals = (setid, spec.classname) if __debug__: print >>hyperdb.DEBUG, 'setid', (self, sql, vals) cursor.execute(sql, vals)
|
y, m, d, x, x, x, x, x, x = time.gmtime()
|
y, m, d, x, x, x, x, x, x = time.gmtime(time.time())
|
def testDate(self): ae = self.assertEqual date = Date("2000-04-17") ae(str(date), '2000-04-17.00:00:00') date = Date("01-25") y, m, d, x, x, x, x, x, x = time.gmtime() ae(str(date), '%s-01-25.00:00:00'%y) date = Date("2000-04-17.03:45") ae(str(date), '2000-04-17.03:45:00') date = Date("08-13.22:13") ae(str(date), '%s-08-13.22:13:00'%y) date = Date("11-07.09:32:43") ae(str(date), '%s-11-07.09:32:43'%y) date = Date("14:25") ae(str(date), '%s-%02d-%02d.14:25:00'%(y, m, d)) date = Date("8:47:11") ae(str(date), '%s-%02d-%02d.08:47:11'%(y, m, d))
|
y, m, d, x, x, x, x, x, x = time.gmtime()
|
y, m, d, x, x, x, x, x, x = time.gmtime(time.time())
|
def testOffset(self): ae = self.assertEqual date = Date("2000-04-17", -5) ae(str(date), '2000-04-17.00:00:00') date = Date("01-25", -5) y, m, d, x, x, x, x, x, x = time.gmtime() ae(str(date), '%s-01-25.00:00:00'%y) date = Date("2000-04-17.03:45", -5) ae(str(date), '2000-04-17.08:45:00') date = Date("08-13.22:13", -5) ae(str(date), '%s-08-14.03:13:00'%y) date = Date("11-07.09:32:43", -5) ae(str(date), '%s-11-07.14:32:43'%y) date = Date("14:25", -5) ae(str(date), '%s-%02d-%02d.19:25:00'%(y, m, d)) date = Date("8:47:11", -5) ae(str(date), '%s-%02d-%02d.13:47:11'%(y, m, d))
|
if type(base) != type("") or not base.startswith( "http://" ) :
|
if not isinstance( base , type('') ) or not base.startswith( "http://" ) :
|
def email_signature(self, nodeid, msgid): ''' Add a signature to the e-mail with some useful information '''
|
try : oldvalues.keys except AttributeError : return '\n'.join( ('', '-'*10, "Precondition/interface Error -- 'oldvalues' isn't a dict." , '-'*10 , '' , str(oldvalues) ) )
|
def generateChangeNote(self, nodeid, oldvalues): """Generate a change note that lists property changes """ cn = self.classname cl = self.db.classes[cn] changed = {} props = cl.getprops(protected=0)
|
|
if isinstance(prop, hyperdb.Multilink) and \ len(args[k]) > 0:
|
if isinstance(prop, hyperdb.Multilink) and args[k]:
|
def history(self, direction='descending', dre=re.compile('\d+')): l = ['<table class="history">' '<tr><th colspan="4" class="header">', _('History'), '</th></tr><tr>', _('<th>Date</th>'), _('<th>User</th>'), _('<th>Action</th>'), _('<th>Args</th>'), '</tr>'] current = {} comments = {} history = self._klass.history(self._nodeid) history.sort() timezone = self._db.getUserTimezone() if direction == 'descending': history.reverse() for prop_n in self._props.keys(): prop = self[prop_n] if isinstance(prop, HTMLProperty): current[prop_n] = prop.plain() # make link if hrefable if (self._props.has_key(prop_n) and isinstance(self._props[prop_n], hyperdb.Link)): classname = self._props[prop_n].classname if os.path.exists(os.path.join(self._db.config.TEMPLATES, classname + '.item')): current[prop_n] = '<a href="%s%s">%s</a>'%(classname, self._klass.get(self._nodeid, prop_n, None), current[prop_n])
|
self.client.db.security.hasPermission = lambda a,b,c: True
|
self.client.db.security.hasPermission = lambda *args, **kwargs: True
|
def testCorrectLogin(self): self.client.db.security.hasPermission = lambda a,b,c: True
|
http://your.tracker.url.example/issue1
|
http://tracker.example/cgi-bin/roundup.cgi/bugs/issue1
|
def testNewIssueAuthMsg(self): message = cStringIO.StringIO('''Content-Type: text/plain;
|
http://your.tracker.url.example/issue1
|
http://tracker.example/cgi-bin/roundup.cgi/bugs/issue1
|
def testSimpleFollowup(self): self.doNewIssue() message = cStringIO.StringIO('''Content-Type: text/plain;
|
http://your.tracker.url.example/issue1
|
http://tracker.example/cgi-bin/roundup.cgi/bugs/issue1
|
def testFollowup(self): self.doNewIssue()
|
http://your.tracker.url.example/issue1
|
http://tracker.example/cgi-bin/roundup.cgi/bugs/issue1
|
def testFollowupTitleMatch(self): self.doNewIssue() message = cStringIO.StringIO('''Content-Type: text/plain;
|
http://your.tracker.url.example/issue1
|
http://tracker.example/cgi-bin/roundup.cgi/bugs/issue1
|
def testFollowupNosyAuthor(self): self.doNewIssue() self.db.config.ADD_AUTHOR_TO_NOSY = 'yes' message = cStringIO.StringIO('''Content-Type: text/plain;
|
http://your.tracker.url.example/issue1
|
http://tracker.example/cgi-bin/roundup.cgi/bugs/issue1
|
def testFollowupNosyRecipients(self): self.doNewIssue() self.db.config.ADD_RECIPIENTS_TO_NOSY = 'yes' message = cStringIO.StringIO('''Content-Type: text/plain;
|
http://your.tracker.url.example/issue1
|
http://tracker.example/cgi-bin/roundup.cgi/bugs/issue1
|
def testFollowupNosyAuthorAndCopy(self): self.doNewIssue() self.db.config.ADD_AUTHOR_TO_NOSY = 'yes' self.db.config.MESSAGES_TO_AUTHOR = 'yes' message = cStringIO.StringIO('''Content-Type: text/plain;
|
http://your.tracker.url.example/issue1
|
http://tracker.example/cgi-bin/roundup.cgi/bugs/issue1
|
def testFollowupNoNosyAuthor(self): self.doNewIssue() self.instance.config.ADD_AUTHOR_TO_NOSY = 'no' message = cStringIO.StringIO('''Content-Type: text/plain;
|
http://your.tracker.url.example/issue1
|
http://tracker.example/cgi-bin/roundup.cgi/bugs/issue1
|
def testFollowupNoNosyRecipients(self): self.doNewIssue() self.instance.config.ADD_RECIPIENTS_TO_NOSY = 'no' message = cStringIO.StringIO('''Content-Type: text/plain;
|
http://your.tracker.url.example/issue1
|
http://tracker.example/cgi-bin/roundup.cgi/bugs/issue1
|
def testEnc01(self): self.doNewIssue() message = cStringIO.StringIO('''Content-Type: text/plain;
|
http://your.tracker.url.example/issue1
|
http://tracker.example/cgi-bin/roundup.cgi/bugs/issue1
|
def testMultipartEnc01(self): self.doNewIssue() message = cStringIO.StringIO('''Content-Type: text/plain;
|
http://your.tracker.url.example/issue1
|
http://tracker.example/cgi-bin/roundup.cgi/bugs/issue1
|
def testFollowupStupidQuoting(self): self.doNewIssue()
|
raise PermissionError, 'You do not have permission to edit %s'%cn
|
raise Unauthorised, 'You do not have permission to edit %s'%cn
|
def _changenode(self, cn, nodeid, props): ''' change the node based on the contents of the form ''' # check for permission if not self.editItemPermission(props): raise PermissionError, 'You do not have permission to edit %s'%cn
|
raise PermissionError, 'You do not have permission to create %s'%cn
|
raise Unauthorised, 'You do not have permission to create %s'%cn
|
def _createnode(self, cn, props): ''' create a node based on the contents of the form ''' # check for permission if not self.newItemPermission(props): raise PermissionError, 'You do not have permission to create %s'%cn
|
ndx = iv.find(k=getattr(row, self.key),i=row.id) if ndx > -1:
|
ndx = iv.find(k=getattr(row, self.key)) if ndx > -1 and iv[ndx].i == row.id:
|
def retire(self, nodeid): if self.db.journaltag is None: raise hyperdb.DatabaseError, 'Database open read-only' self.fireAuditors('retire', nodeid, None) view = self.getview(READWRITE) ndx = view.find(id=int(nodeid)) if ndx < 0: raise KeyError, "nodeid %s not found" % nodeid
|
"Defines the brackets used for delimiting the commands\n" "suffix in a subject line."),
|
"Defines the brackets used for delimiting the prefix and \n" 'suffix in a subject line. The presence of "suffix" in\n' "the config option name is a historical artifact and may\n" "be ignored."),
|
def str2value(self, value): try: roundup.date.get_timezone(value) except KeyError: raise OptionValueError(self, value, "Timezone name or numeric hour offset required") return value
|
if sort: w('<input type="hidden" name=":sort" value="%s">'%','.join(sort))
|
def render(self, filterspec={}, filter=[], columns=[], sort=[], group=[], show_display_form=1, nodeids=None, show_customization=1): self.filterspec = filterspec
|
|
self.wfile.write(favico)
|
bufsize = 4 * 1024 Processing = True while Processing: data = favicon_fileobj.read(bufsize) if len(data) > 0: self.wfile.write(data) else: Processing = False favicon_fileobj.close()
|
def inner_run_cgi(self): ''' This is the inner part of the CGI handling ''' rest = self.path
|
l = props.items() l.sort() for propname, prop in l:
|
prop_items = props.items() prop_items.sort() for propname, prop in prop_items:
|
def generateCreateNote(self, nodeid): """Generate a create note that lists initial property values """ cn = self.classname cl = self.db.classes[cn] props = cl.getprops(protected=0)
|
l = changed.items() l.sort() for propname, oldvalue in l:
|
changed_items = changed.items() changed_items.sort() for propname, oldvalue in changed_items:
|
def generateChangeNote(self, nodeid, oldvalues): """Generate a change note that lists property changes """ if not isinstance(oldvalues, type({})): raise TypeError("'oldvalues' must be dict-like, not %s."% type(oldvalues))
|
av = an[prop] = av.lower()
|
av = av.lower()
|
def sortfun(a, b, sort=sort, group=group, properties=self.getprops(), db = self.db, cl=self): a_id, an = a b_id, bn = b # sort by group and then sort for dir, prop in group, sort: if dir is None or prop is None: continue
|
bv = bn[prop] = bv.lower()
|
bv = bv.lower()
|
def sortfun(a, b, sort=sort, group=group, properties=self.getprops(), db = self.db, cl=self): a_id, an = a b_id, bn = b # sort by group and then sort for dir, prop in group, sort: if dir is None or prop is None: continue
|
for prop_n in self._props:
|
for prop_n in self._props.keys():
|
def history(self, direction='descending', dre=re.compile('\d+')): l = ['<table class="history">' '<tr><th colspan="4" class="header">', _('History'), '</th></tr><tr>', _('<th>Date</th>'), _('<th>User</th>'), _('<th>Action</th>'), _('<th>Args</th>'), '</tr>'] current = {} comments = {} history = self._klass.history(self._nodeid) history.sort() if direction == 'descending': history.reverse() for prop_n in self._props: prop = self[prop_n] if isinstance(prop, HTMLProperty): current[prop_n] = prop.plain() # make link if hrefable if prop_n in self._props and isinstance(self._props[prop_n], hyperdb.Link): classname = self._props[prop_n].classname if os.path.exists(os.path.join(self._db.config.TEMPLATES, classname + '.item')): current[prop_n] = '<a href="%s%s">%s</a>'%(classname, self._klass.get(self._nodeid, prop_n, None), current[prop_n])
|
if prop_n in self._props and isinstance(self._props[prop_n], hyperdb.Link):
|
if isinstance(self._props[prop_n], hyperdb.Link):
|
def history(self, direction='descending', dre=re.compile('\d+')): l = ['<table class="history">' '<tr><th colspan="4" class="header">', _('History'), '</th></tr><tr>', _('<th>Date</th>'), _('<th>User</th>'), _('<th>Action</th>'), _('<th>Args</th>'), '</tr>'] current = {} comments = {} history = self._klass.history(self._nodeid) history.sort() if direction == 'descending': history.reverse() for prop_n in self._props: prop = self[prop_n] if isinstance(prop, HTMLProperty): current[prop_n] = prop.plain() # make link if hrefable if prop_n in self._props and isinstance(self._props[prop_n], hyperdb.Link): classname = self._props[prop_n].classname if os.path.exists(os.path.join(self._db.config.TEMPLATES, classname + '.item')): current[prop_n] = '<a href="%s%s">%s</a>'%(classname, self._klass.get(self._nodeid, prop_n, None), current[prop_n])
|
if k in current:
|
if current.has_key(k):
|
def history(self, direction='descending', dre=re.compile('\d+')): l = ['<table class="history">' '<tr><th colspan="4" class="header">', _('History'), '</th></tr><tr>', _('<th>Date</th>'), _('<th>User</th>'), _('<th>Action</th>'), _('<th>Args</th>'), '</tr>'] current = {} comments = {} history = self._klass.history(self._nodeid) history.sort() if direction == 'descending': history.reverse() for prop_n in self._props: prop = self[prop_n] if isinstance(prop, HTMLProperty): current[prop_n] = prop.plain() # make link if hrefable if prop_n in self._props and isinstance(self._props[prop_n], hyperdb.Link): classname = self._props[prop_n].classname if os.path.exists(os.path.join(self._db.config.TEMPLATES, classname + '.item')): current[prop_n] = '<a href="%s%s">%s</a>'%(classname, self._klass.get(self._nodeid, prop_n, None), current[prop_n])
|
if k not in current: cell.append('%s: (no value)'%k) else:
|
if current.has_key(k):
|
def history(self, direction='descending', dre=re.compile('\d+')): l = ['<table class="history">' '<tr><th colspan="4" class="header">', _('History'), '</th></tr><tr>', _('<th>Date</th>'), _('<th>User</th>'), _('<th>Action</th>'), _('<th>Args</th>'), '</tr>'] current = {} comments = {} history = self._klass.history(self._nodeid) history.sort() if direction == 'descending': history.reverse() for prop_n in self._props: prop = self[prop_n] if isinstance(prop, HTMLProperty): current[prop_n] = prop.plain() # make link if hrefable if prop_n in self._props and isinstance(self._props[prop_n], hyperdb.Link): classname = self._props[prop_n].classname if os.path.exists(os.path.join(self._db.config.TEMPLATES, classname + '.item')): current[prop_n] = '<a href="%s%s">%s</a>'%(classname, self._klass.get(self._nodeid, prop_n, None), current[prop_n])
|
properties['superseder'] = hyperdb.Multilink("issue")
|
properties['superseder'] = hyperdb.Multilink(classname)
|
def __init__(self, db, classname, **properties): """The newly-created class automatically includes the "messages", "files", "nosy", and "superseder" properties. If the 'properties' dictionary attempts to specify any of these properties or a "creation" or "activity" property, a ValueError is raised.""" if not properties.has_key('title'): properties['title'] = hyperdb.String() if not properties.has_key('messages'): properties['messages'] = hyperdb.Multilink("msg") if not properties.has_key('files'): properties['files'] = hyperdb.Multilink("file") if not properties.has_key('nosy'): properties['nosy'] = hyperdb.Multilink("user") if not properties.has_key('superseder'): properties['superseder'] = hyperdb.Multilink("issue") if (properties.has_key('creation') or properties.has_key('activity') or properties.has_key('creator')): raise ValueError, '"creation", "activity" and "creator" are reserved' Class.__init__(self, db, classname, **properties)
|
raise MailUsageError, '''
|
raise MailUsageError, _("""
|
def handle_message(self, message): ''' message - a Message instance
|
'''
|
""")
|
def handle_message(self, message): ''' message - a Message instance
|
raise MailUsageError, """
|
raise MailUsageError, _("""
|
def handle_message(self, message): ''' message - a Message instance
|
Subject was: '%s' """%subject
|
Subject was: '%(subject)s' """) % locals()
|
def handle_message(self, message): ''' message - a Message instance
|
raise MailUsageError, ''' The class name you identified in the subject line ("%s") does not exist in the
|
validname = ', '.join(self.db.getclasses()) raise MailUsageError, _(""" The class name you identified in the subject line ("%(classname)s") does not exist in the
|
def handle_message(self, message): ''' message - a Message instance
|
Valid class names are: %s Subject was: "%s" '''%(classname, ', '.join(self.db.getclasses()), subject)
|
Valid class names are: %(validname)s Subject was: "%(subject)s" """) % locals()
|
def handle_message(self, message): ''' message - a Message instance
|
Subject was: "%s" '''%subject
|
Subject was: "%(subject)s" """) % locals()
|
def handle_message(self, message): ''' message - a Message instance
|
raise MailUsageError, ''' The node specified by the designator in the subject of your message ("%s") does not exist. Subject was: "%s" '''%(nodeid, subject)
|
raise MailUsageError, _(""" The node specified by the designator in the subject of your message ("%(nodeid)s") does not exist. Subject was: "%(subject)s" """) % locals()
|
def handle_message(self, message): ''' message - a Message instance
|
raise MailUsageError, '''
|
mailadmin = config['ADMIN_EMAIL'] raise MailUsageError, _("""
|
def handle_message(self, message): ''' message - a Message instance
|
%s and have them fix the incorrect class specified as: %s ''' % (config['ADMIN_EMAIL'], current_class)
|
%(mailadmin)s and have them fix the incorrect class specified as: %(current_class)s """) % locals()
|
def handle_message(self, message): ''' message - a Message instance
|
%s and have them fix the incorrect properties: %s '''%(config['ADMIN_EMAIL'], errors)
|
%(mailadmin)s and have them fix the incorrect properties: %(errors)s """) % locals()
|
def handle_message(self, message): ''' message - a Message instance
|
raise Unauthorized, '''
|
from_address = from_list[0][1] raise Unauthorized, _("""
|
def handle_message(self, message): ''' message - a Message instance
|
Unknown address: %s '''%from_list[0][1]
|
Unknown address: %(from_address)s """) % locals()
|
def handle_message(self, message): ''' message - a Message instance
|
raise Unauthorized, 'You are not permitted to access '\ 'this tracker.'
|
raise Unauthorized, _( 'You are not permitted to access this tracker.')
|
def handle_message(self, message): ''' message - a Message instance
|
raise Unauthorized, 'You are not permitted to '\ 'edit %s.'%classname
|
raise Unauthorized, _( 'You are not permitted to edit %(classname)s.') % locals()
|
def handle_message(self, message): ''' message - a Message instance
|
raise Unauthorized, 'You are not permitted to '\ 'create %s.'%classname
|
raise Unauthorized, _( 'You are not permitted to create %(classname)s.' ) % locals()
|
def handle_message(self, message): ''' message - a Message instance
|
- %s Subject was: "%s" '''%(errors, subject)
|
- %(errors)s Subject was: "%(subject)s" """) % locals()
|
def handle_message(self, message): ''' message - a Message instance
|
raise Unauthorized, 'You are not permitted to create files.'
|
raise Unauthorized, _( 'You are not permitted to create files.')
|
def handle_message(self, message): ''' message - a Message instance
|
raise Unauthorized, 'You are not permitted to add '\ 'files to %s.'%classname
|
raise Unauthorized, _( 'You are not permitted to add files to %(classname)s.' ) % locals()
|
def handle_message(self, message): ''' message - a Message instance
|
raise Unauthorized, 'You are not permitted to create messages.'
|
raise Unauthorized, _( 'You are not permitted to create messages.')
|
def handle_message(self, message): ''' message - a Message instance
|
%s '''%error
|
%(error)s """) % locals()
|
def handle_message(self, message): ''' message - a Message instance
|
raise Unauthorized, 'You are not permitted to add '\ 'messages to %s.'%classname
|
raise Unauthorized, _( 'You are not permitted to add messages to %(classname)s.' ) % locals()
|
def handle_message(self, message): ''' message - a Message instance
|
raise Unauthorized, 'You are not permitted to edit '\ 'property %s of class %s.'%(prop,classname)
|
raise Unauthorized, _('You are not permitted to edit ' 'property %(prop)s of class %(classname)s.') % locals()
|
def handle_message(self, message): ''' message - a Message instance
|
%s '''%message
|
%(message)s """) % locals()
|
def handle_message(self, message): ''' message - a Message instance
|
errors.append('not of form [arg=value,value,...;' 'arg=value,value,...]')
|
errors.append(_('not of form [arg=value,value,...;' 'arg=value,value,...]'))
|
def setPropArrayFromString(self, cl, propString, nodeid=None): ''' takes string of form prop=value,value;prop2=value and returns (error, prop[..]) ''' props = {} errors = [] for prop in string.split(propString, ';'): # extract the property name and value try: propname, value = prop.split('=') except ValueError, message: errors.append('not of form [arg=value,value,...;' 'arg=value,value,...]') return (errors, props) # convert the value to a hyperdb-usable value propname = propname.strip() try: props[propname] = hyperdb.rawToHyperdb(self.db, cl, nodeid, propname, value) except hyperdb.HyperdbValueError, message: errors.append(str(message)) return errors, props
|
if is_edit_ok():
|
if self.is_edit_ok():
|
def field(self, size = 30): ''' Render a form edit field for the property
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.