comparison roundup/cgi/client.py @ 2011:6a9e4e07c7d9 maint-0.6

oops, python2.3-ism
author Richard Jones <richard@users.sourceforge.net>
date Fri, 13 Feb 2004 01:35:02 +0000
parents 88291693df3a
children 2add75e296d2
comparison
equal deleted inserted replaced
2008:88291693df3a 2011:6a9e4e07c7d9
1 # $Id: client.py,v 1.130.2.8 2004-02-13 01:13:25 richard Exp $ 1 # $Id: client.py,v 1.130.2.9 2004-02-13 01:35:02 richard Exp $
2 2
3 __doc__ = """ 3 __doc__ = """
4 WWW request handler (also used in the stand-alone server). 4 WWW request handler (also used in the stand-alone server).
5 """ 5 """
6 6
1052 This follows the same form as the editItemAction, with the same 1052 This follows the same form as the editItemAction, with the same
1053 special form values. 1053 special form values.
1054 ''' 1054 '''
1055 # parse the props from the form 1055 # parse the props from the form
1056 try: 1056 try:
1057 props, links = self.parsePropsFromForm(create=True) 1057 props, links = self.parsePropsFromForm(create=1)
1058 except (ValueError, KeyError), message: 1058 except (ValueError, KeyError), message:
1059 self.error_message.append(_('Error: ') + str(message)) 1059 self.error_message.append(_('Error: ') + str(message))
1060 return 1060 return
1061 1061
1062 # handle the props - edit or create 1062 # handle the props - edit or create
1461 if not t: 1461 if not t:
1462 raise ValueError, 'Invalid %s number'%t 1462 raise ValueError, 'Invalid %s number'%t
1463 url = '%s%s%s'%(self.db.config.TRACKER_WEB, t, n) 1463 url = '%s%s%s'%(self.db.config.TRACKER_WEB, t, n)
1464 raise Redirect, url 1464 raise Redirect, url
1465 1465
1466 def parsePropsFromForm(self, create=False, num_re=re.compile('^\d+$')): 1466 def parsePropsFromForm(self, create=0, num_re=re.compile('^\d+$')):
1467 ''' Item properties and their values are edited with html FORM 1467 ''' Item properties and their values are edited with html FORM
1468 variables and their values. You can: 1468 variables and their values. You can:
1469 1469
1470 - Change the value of some property of the current item. 1470 - Change the value of some property of the current item.
1471 - Create a new item of any class, and edit the new item's 1471 - Create a new item of any class, and edit the new item's

Roundup Issue Tracker: http://roundup-tracker.org/