Skip to content

Commit 2f0904f

Browse files
author
Richard Jones
committed
Added time logging and file uploading to the templates.
1 parent 0daae85 commit 2f0904f

File tree

10 files changed

+422
-254
lines changed

10 files changed

+422
-254
lines changed

CHANGES.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
This file contains the changes to the Roundup system over time. The entries
22
are given with the most recent entry first.
33

4+
2001-08-?? - 0.2.4
5+
Features:
6+
. Added ability for cgi newblah forms to indicate that the new node
7+
should be linked somewhere.
8+
. Added time logging and file uploading to the templates.
9+
10+
Fixed:
11+
. Fixed the agument handling for the roundup-admin find command.
12+
. Fixed handling of summary when no note supplied for newblah. Again.
13+
. Fixed detection of no form in htmltemplate Field display.
14+
15+
416
2001-07-30 - 0.2.3
517
Big change:
618
. I've split off the support class from the issue class in "extended".

roundup-admin

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
#! /usr/bin/python
2-
# $Id: roundup-admin,v 1.9 2001-07-30 03:52:55 richard Exp $
2+
# $Id: roundup-admin,v 1.10 2001-07-30 08:12:17 richard Exp $
33

44
import sys
55
if int(sys.version[0]) < 2:
66
print 'Roundup requires python 2.0 or later.'
77
sys.exit(1)
88

9-
import string, os, getpass, getopt
9+
import string, os, getpass, getopt, re
1010
from roundup import date, roundupdb, init
1111

1212
def usage(message=''):
@@ -173,19 +173,25 @@ def do_find(db, args):
173173
'''Usage: find classname propname=value ...
174174
Find the nodes of the given class with a given property value.
175175
176-
Find the nodes of the given class with a given property value.
176+
Find the nodes of the given class with a given property value. The
177+
value may be either the nodeid of the linked node, or its key value.
177178
'''
178179
classname = args[0]
179180
cl = db.getclass(classname)
180181

181182
# look up the linked-to class and get the nodeid that has the value
182-
propname, value = args[1:].split('=')
183-
propcl = cl[propname].classname
184-
nodeid = propcl.lookup(value)
183+
propname, value = args[1].split('=')
184+
num_re = re.compile('^\d+$')
185+
if num_re.match(value):
186+
nodeid = value
187+
else:
188+
propcl = cl.properties[propname].classname
189+
propcl = db.getclass(propcl)
190+
nodeid = propcl.lookup(value)
185191

186192
# now do the find
187193
# TODO: handle the -c option
188-
print cl.find(propname, nodeid)
194+
print cl.find(**{propname: nodeid})
189195
return 0
190196

191197
def do_spec(db, args):
@@ -236,7 +242,6 @@ def do_list(db, args):
236242
in order: the key, "name", "title" and then the first property,
237243
alphabetically.
238244
'''
239-
db = instance.open()
240245
classname = args[0]
241246
cl = db.getclass(classname)
242247
if len(args) > 1:
@@ -404,6 +409,9 @@ if __name__ == '__main__':
404409

405410
#
406411
# $Log: not supported by cvs2svn $
412+
# Revision 1.9 2001/07/30 03:52:55 richard
413+
# init help now lists templates and backends
414+
#
407415
# Revision 1.8 2001/07/30 02:37:07 richard
408416
# Freshen is really broken. Commented out.
409417
#

0 commit comments

Comments
 (0)