Changeset 411 for WAeUP_SRP/trunk/Accommodation.py
- Timestamp:
- 23 Aug 2006, 20:19:01 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/Accommodation.py
r407 r411 33 33 h = hall.getContent() 34 34 reserved = [int(r) for r in h.reserved_rooms.split()] 35 print h.which_sex 36 sex = 'male' 37 if h.which_sex: 38 sex = 'female' 35 39 for block in range(1,int(h.nr_of_blocks)): 36 40 for floor in range(1,int(h.nr_of_floors)): … … 48 52 elif bed in h.beds_for_final: 49 53 bt = 'fi' 50 print bt 51 freelist.addRecord(bed = '%s_%d_%s' % (h.getId(),room_nr,bed), 52 bed_type = bt) 54 bt = "%(sex)s_%(bt)s" % vars() 55 uid = '%s_%d_%s' % (hall.getId(),room_nr,bed) 56 print bt,uid 57 freelist.addRecord(bed = uid) 58 try: 59 freelist.modifyRecord(uid, bed = bed, bed_type = bt) 60 except ValueError,e: 61 freelist.deleteRecord(uid) 62 53 63 return self.accommodation.academics_contents() 54 64
Note: See TracChangeset for help on using the changeset viewer.