Mercurial > p > roundup > code
comparison roundup/cgi/templating.py @ 2010:1b11ffd8015e
forward-porting of fixed edit action / parsePropsFromForm...
to handle index-page edits better
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Fri, 13 Feb 2004 01:32:37 +0000 |
| parents | fc52d57c6c3e |
| children | 366d3bbce982 |
comparison
equal
deleted
inserted
replaced
| 2009:3594e5d2b411 | 2010:1b11ffd8015e |
|---|---|
| 405 | 405 |
| 406 def getItem(self, itemid, num_re=re.compile('-?\d+')): | 406 def getItem(self, itemid, num_re=re.compile('-?\d+')): |
| 407 ''' Get an item of this class by its item id. | 407 ''' Get an item of this class by its item id. |
| 408 ''' | 408 ''' |
| 409 # make sure we're looking at an itemid | 409 # make sure we're looking at an itemid |
| 410 if not num_re.match(itemid): | 410 if not isinstance(itemid, type(1)) and not num_re.match(itemid): |
| 411 itemid = self._klass.lookup(itemid) | 411 itemid = self._klass.lookup(itemid) |
| 412 | 412 |
| 413 if self.classname == 'user': | 413 if self.classname == 'user': |
| 414 klass = HTMLUser | 414 klass = HTMLUser |
| 415 else: | 415 else: |
