Changeset 3606
- Timestamp:
- 10/23/07 16:45:00 (1 year ago)
- Files:
-
- trunk/Schevo/schevo/field.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Schevo/schevo/field.py
r3561 r3606 1268 1268 allow_unassigned = False 1269 1269 1270 def __str__(self): 1271 v = self.get() 1272 if v is UNASSIGNED: 1273 return '<UNASSIGNED>' 1274 else: 1275 return ', '.join(str(item) for item in v) 1276 1277 def __unicode__(self): 1278 v = self.get() 1279 if v is UNASSIGNED: 1280 return u'<UNASSIGNED>' 1281 else: 1282 return u', '.join(unicode(item) for item in v) 1283 1270 1284 def convert(self, value, db=None): 1271 1285 if isinstance(value, (list, tuple)): … … 1424 1438 """Set of Entity instances field class.""" 1425 1439 1440 def __str__(self): 1441 v = self.get() 1442 if v is UNASSIGNED: 1443 return '<UNASSIGNED>' 1444 else: 1445 return ', '.join(str(item) for item in v) 1446 1447 def __unicode__(self): 1448 v = self.get() 1449 if v is UNASSIGNED: 1450 return u'<UNASSIGNED>' 1451 else: 1452 return u', '.join(unicode(item) for item in v) 1453 1426 1454 def convert(self, value, db=None): 1427 1455 if isinstance(value, (set, frozenset)): … … 1513 1541 class EntitySetSet(_EntityBase): 1514 1542 """Set of EntitySet instances field class.""" 1543 1544 def __str__(self): 1545 v = self.get() 1546 if v is UNASSIGNED: 1547 return '<UNASSIGNED>' 1548 else: 1549 return '; '.join(', '.join(str(item) for item in items) 1550 for items in v) 1551 1552 def __unicode__(self): 1553 v = self.get() 1554 if v is UNASSIGNED: 1555 return u'<UNASSIGNED>' 1556 else: 1557 return '; '.join(u', '.join(unicode(item) for item in items) 1558 for items in v) 1515 1559 1516 1560 def convert(self, value, db=None):
