- Timestamp:
- 9 Oct 2006, 09:09:57 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_accommodation/getAccoHallsInfo.py
r622 r626 35 35 items.append(row) 36 36 info['items'] = items 37 pa = context.portal_accommodation 38 bed_types = pa.uniqueValuesFor('bed_type') 39 bt_list = [] 40 for bt in bed_types: 41 res = pa(bed_type=bt) 42 bt_list.append({'name': bt, 'count': len(res)}) 43 info['bed_types'] = bt_list 44 reserved = pa.uniqueValuesFor('student') 45 res_list = [] 46 if reserved > 1: 47 for st in reserved: 48 if st: 49 res = pa(student=st) 50 bt_list.append({'student': st, 'bed': res[0].bed }) 51 info['reserved'] = res_list 52 37 53 return info
Note: See TracChangeset for help on using the changeset viewer.