Mercurial > p > roundup > code
comparison roundup/cgi/client.py @ 2051:f8e292e68e01 maint-0.6
ehem
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Wed, 25 Feb 2004 23:26:30 +0000 |
| parents | 050ca11cc1e4 |
| children | e99367f7c11a |
comparison
equal
deleted
inserted
replaced
| 2050:050ca11cc1e4 | 2051:f8e292e68e01 |
|---|---|
| 1 # $Id: client.py,v 1.130.2.12 2004-02-25 23:23:56 richard Exp $ | 1 # $Id: client.py,v 1.130.2.13 2004-02-25 23:26:30 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 |
| 1487 t = self.form[key].value.strip() | 1487 t = self.form[key].value.strip() |
| 1488 elif numre.match(key): | 1488 elif numre.match(key): |
| 1489 n = self.form[key].value.strip() | 1489 n = self.form[key].value.strip() |
| 1490 if not t: | 1490 if not t: |
| 1491 raise ValueError, 'No type specified' | 1491 raise ValueError, 'No type specified' |
| 1492 return | |
| 1493 if not n: | 1492 if not n: |
| 1494 raise SeriousError, _('No ID entered') | 1493 raise SeriousError, _('No ID entered') |
| 1495 return | |
| 1496 try: | 1494 try: |
| 1497 int(n) | 1495 int(n) |
| 1498 except ValueError: | 1496 except ValueError: |
| 1499 d = {'input': n, 'classname': t} | 1497 d = {'input': n, 'classname': t} |
| 1500 raise SeriousError, _( | 1498 raise SeriousError, _( |
| 1501 '"%(input)s" is not an ID (%(classname)s ID required)')%d | 1499 '"%(input)s" is not an ID (%(classname)s ID required)')%d |
| 1502 return | |
| 1503 url = '%s%s%s'%(self.db.config.TRACKER_WEB, t, n) | 1500 url = '%s%s%s'%(self.db.config.TRACKER_WEB, t, n) |
| 1504 raise Redirect, url | 1501 raise Redirect, url |
| 1505 | 1502 |
| 1506 def parsePropsFromForm(self, create=0, num_re=re.compile('^\d+$')): | 1503 def parsePropsFromForm(self, create=0, num_re=re.compile('^\d+$')): |
| 1507 ''' Item properties and their values are edited with html FORM | 1504 ''' Item properties and their values are edited with html FORM |
