Mercurial > p > roundup > code
comparison roundup/cgi/client.py @ 1385:2bd4822f96a6
- more fixes to CGI form handling
- switch metakit to use "compressed" multilink journal change representation
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Wed, 15 Jan 2003 22:39:07 +0000 |
| parents | 87143c3d7156 |
| children | 71928bf79302 |
comparison
equal
deleted
inserted
replaced
| 1383:f19dde90e473 | 1385:2bd4822f96a6 |
|---|---|
| 1 # $Id: client.py,v 1.70 2003-01-15 11:14:01 richard Exp $ | 1 # $Id: client.py,v 1.71 2003-01-15 22:39:07 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 |
| 1219 else: | 1219 else: |
| 1220 propname = key | 1220 propname = key |
| 1221 | 1221 |
| 1222 # does the property exist? | 1222 # does the property exist? |
| 1223 if not properties.has_key(propname): | 1223 if not properties.has_key(propname): |
| 1224 if mlaction == 'remove': | 1224 if mlaction != 'set': |
| 1225 raise ValueError, 'You have submitted a remove action for'\ | 1225 raise ValueError, 'You have submitted a %s action for'\ |
| 1226 ' the property "%s" which doesn\'t exist'%propname | 1226 ' the property "%s" which doesn\'t exist'%(mlaction, |
| 1227 propname) | |
| 1227 continue | 1228 continue |
| 1228 proptype = properties[propname] | 1229 proptype = properties[propname] |
| 1229 | 1230 |
| 1230 # Get the form value. This value may be a MiniFieldStorage or a list | 1231 # Get the form value. This value may be a MiniFieldStorage or a list |
| 1231 # of MiniFieldStorages. | 1232 # of MiniFieldStorages. |
| 1279 value = date.Interval(value) | 1280 value = date.Interval(value) |
| 1280 else: | 1281 else: |
| 1281 value = None | 1282 value = None |
| 1282 elif isinstance(proptype, hyperdb.Link): | 1283 elif isinstance(proptype, hyperdb.Link): |
| 1283 # see if it's the "no selection" choice | 1284 # see if it's the "no selection" choice |
| 1284 if value == '-1': | 1285 if value == '-1' or not value: |
| 1285 # if we're creating, just don't include this property | 1286 # if we're creating, just don't include this property |
| 1286 if not nodeid: | 1287 if not nodeid: |
| 1287 continue | 1288 continue |
| 1288 value = None | 1289 value = None |
| 1289 else: | 1290 else: |
